diff --git a/crates/matrix-sdk-crypto/src/olm/account.rs b/crates/matrix-sdk-crypto/src/olm/account.rs index ea59c2a7af9..ac01502566c 100644 --- a/crates/matrix-sdk-crypto/src/olm/account.rs +++ b/crates/matrix-sdk-crypto/src/olm/account.rs @@ -1529,12 +1529,12 @@ mod tests { let (_, second_one_time_keys, _) = account.keys_for_upload(); assert!(!second_one_time_keys.is_empty()); - let device_key_ids: BTreeSet<&OneTimeKeyId> = + let one_time_key_ids: BTreeSet<&OneTimeKeyId> = one_time_keys.keys().map(Deref::deref).collect(); - let second_device_key_ids: BTreeSet<&OneTimeKeyId> = + let second_one_time_key_ids: BTreeSet<&OneTimeKeyId> = second_one_time_keys.keys().map(Deref::deref).collect(); - assert_eq!(device_key_ids, second_device_key_ids); + assert_eq!(one_time_key_ids, second_one_time_key_ids); account.mark_keys_as_published(); account.update_uploaded_key_count(50); @@ -1549,10 +1549,10 @@ mod tests { let (_, fourth_one_time_keys, _) = account.keys_for_upload(); assert!(!fourth_one_time_keys.is_empty()); - let fourth_device_key_ids: BTreeSet<&OneTimeKeyId> = + let fourth_one_time_key_ids: BTreeSet<&OneTimeKeyId> = fourth_one_time_keys.keys().map(Deref::deref).collect(); - assert_ne!(device_key_ids, fourth_device_key_ids); + assert_ne!(one_time_key_ids, fourth_one_time_key_ids); Ok(()) }