From cdab735ce54096562974565736a59d27e110d302 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Tue, 19 Apr 2022 16:19:30 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Jonas Platte --- crates/matrix-sdk-base/src/store/integration_tests.rs | 4 ++-- crates/matrix-sdk-store-encryption/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/matrix-sdk-base/src/store/integration_tests.rs b/crates/matrix-sdk-base/src/store/integration_tests.rs index b583fff20..eacd563ed 100644 --- a/crates/matrix-sdk-base/src/store/integration_tests.rs +++ b/crates/matrix-sdk-base/src/store/integration_tests.rs @@ -277,8 +277,8 @@ macro_rules! statestore_integration_tests { assert!(store.get_sync_token().await?.is_some()); assert!(store.get_presence_event(user_id).await?.is_some()); - assert_eq!(store.get_room_infos().await?.len(), 1, "Expected to find 1 room info "); - assert_eq!(store.get_stripped_room_infos().await?.len(), 1, "Expected to find 1 stripped room info"); + assert_eq!(store.get_room_infos().await?.len(), 1, "Expected to find 1 room info "); + assert_eq!(store.get_stripped_room_infos().await?.len(), 1, "Expected to find 1 stripped room info"); assert!(store.get_account_data_event(GlobalAccountDataEventType::PushRules).await?.is_some()); assert!(store.get_state_event(room_id, StateEventType::RoomName, "").await?.is_some()); diff --git a/crates/matrix-sdk-store-encryption/src/lib.rs b/crates/matrix-sdk-store-encryption/src/lib.rs index 68612b1c5..67a8905fc 100644 --- a/crates/matrix-sdk-store-encryption/src/lib.rs +++ b/crates/matrix-sdk-store-encryption/src/lib.rs @@ -303,7 +303,7 @@ impl StoreCipher { /// /// # Examples /// - /// ``` + /// ```no_run /// # let example = || { /// use matrix_sdk_store_encryption::StoreCipher; /// use serde_json::{json, value::Value}; @@ -318,7 +318,7 @@ impl StoreCipher { /// let decrypted: Value = store_cipher.decrypt_value_typed(&encrypted)?; /// /// assert_eq!(value, decrypted); - /// # Result::<_, anyhow::Error>::Ok(()) }; + /// # anyhow::Ok(()) }; /// ``` pub fn encrypt_value_typed(&self, value: &impl Serialize) -> Result { let data = serde_json::to_vec(value)?;