atagen

macltok

public
Star0
Watch0

Commit 0d763e4284ef

tarball

atagen <boss@atagen.co>2026-10-25 09:31 UTC

1 file changed+3-5
engine: drop EngineError::MentionsStore

The mentions service no longer fails to open on a bad store, so the variant could only ever wrap a missing user id, which Engine::from_client already refuses as Unauthenticated.
Modified file: src/engine/mod.rs+3 additions−5 deletions
@@ -160,8 +160,6 @@ pub enum EngineError {
160160 ZeroCapacity,
161161 #[error("could not build the sync service")]
162162 SyncService(#[source] matrix_sdk_ui::sync_service::Error),
163- #[error("could not open the mentions service")]
164- MentionsStore(#[source] crate::Error),
165163 #[error("the event receiver has closed")]
166164 EventReceiverClosed,
167165 #[error("engine task {task} panicked")]
@@ -176,8 +174,7 @@ impl EngineError {
176174 Self::TaskPanicked { .. } => EngineErrorKind::Watcher,
177175 Self::Unauthenticated
178176 | Self::ZeroCapacity
179- | Self::SyncService(_)
180- | Self::MentionsStore(_) => EngineErrorKind::Other,
177+ | Self::SyncService(_) => EngineErrorKind::Other,
181178 },
182179 message: self.to_string(),
183180 }
@@ -375,7 +372,8 @@ impl Engine {
375372 config.clone(),
376373 )
377374 .await
378- .map_err(EngineError::MentionsStore)?;
375+ // a missing user id is all it still refuses, and that was turned away above
376+ .map_err(|_| EngineError::Unauthenticated)?;
379377 let sync = Arc::new(
380378 SyncService::builder(client.clone())
381379 .with_offline_mode()