mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-19 14:19:06 -04:00
Apply suggestions from code review
Co-authored-by: Jonas Platte <jplatte@element.io>
This commit is contained in:
committed by
GitHub
parent
e989b9aff7
commit
cdab735ce5
@@ -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());
|
||||
|
||||
@@ -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<EncryptedValue, Error> {
|
||||
let data = serde_json::to_vec(value)?;
|
||||
|
||||
Reference in New Issue
Block a user