diff --git a/crates/matrix-sdk-crypto/src/store/traits.rs b/crates/matrix-sdk-crypto/src/store/traits.rs index 9e5ec6b45..bdfacbbed 100644 --- a/crates/matrix-sdk-crypto/src/store/traits.rs +++ b/crates/matrix-sdk-crypto/src/store/traits.rs @@ -357,7 +357,7 @@ pub trait CryptoStore: AsyncTraitDeps { ) -> Result, Self::Error>; /// Get whether we have previously downloaded all room keys for a particular - /// from the key backup in advance of building a room key bundle. + /// room from the key backup in advance of building a room key bundle. async fn has_downloaded_all_room_keys(&self, room_id: &RoomId) -> Result; /// Get arbitrary data from the store diff --git a/crates/matrix-sdk-sqlite/src/crypto_store.rs b/crates/matrix-sdk-sqlite/src/crypto_store.rs index 05742f3cb..aa6520fd8 100644 --- a/crates/matrix-sdk-sqlite/src/crypto_store.rs +++ b/crates/matrix-sdk-sqlite/src/crypto_store.rs @@ -825,13 +825,13 @@ trait SqliteObjectCryptoStoreExt: SqliteAsyncConnExt { } async fn has_downloaded_all_room_keys(&self, room_id: Key) -> Result { - self.query_row( - "SELECT EXISTS (SELECT 1 FROM room_key_backups_fully_downloaded WHERE room_id = ?)", - (room_id,), - |row| row.get(0), - ) - .await - .map_err(Into::into) + Ok(self + .query_row( + "SELECT EXISTS (SELECT 1 FROM room_key_backups_fully_downloaded WHERE room_id = ?)", + (room_id,), + |row| row.get(0), + ) + .await?) } }