refactor: Use Try operator over Into::into, fixup comment.

This commit is contained in:
Skye Elliot
2026-01-13 17:46:54 +00:00
parent 831ab6d429
commit e156d8e00c
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -357,7 +357,7 @@ pub trait CryptoStore: AsyncTraitDeps {
) -> Result<Option<StoredRoomKeyBundleData>, 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<bool, Self::Error>;
/// Get arbitrary data from the store
+7 -7
View File
@@ -825,13 +825,13 @@ trait SqliteObjectCryptoStoreExt: SqliteAsyncConnExt {
}
async fn has_downloaded_all_room_keys(&self, room_id: Key) -> Result<bool> {
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?)
}
}