diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index 5b7dd8c5..8b4fe692 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -2082,11 +2082,8 @@ impl Client { let olm = self.base_client.olm_machine().await?; olm.get_verification_request(flow_id).and_then(|r| { - if let Some(room) = self.get_joined_room(r.room_id()) { - Some(VerificationRequest { inner: r, room }) - } else { - None - } + self.get_joined_room(r.room_id()) + .map(|room| VerificationRequest { inner: r, room }) }) } diff --git a/matrix_sdk_base/src/store/ambiguity_map.rs b/matrix_sdk_base/src/store/ambiguity_map.rs index 4c84cdd2..3d524d20 100644 --- a/matrix_sdk_base/src/store/ambiguity_map.rs +++ b/matrix_sdk_base/src/store/ambiguity_map.rs @@ -183,14 +183,10 @@ impl AmbiguityCache { .and_then(|m| m.get(&member_event.state_key)) { Some(m.clone()) - } else if let Some(m) = self - .store - .get_member_event(room_id, &member_event.state_key) - .await? - { - Some(m) } else { - None + self.store + .get_member_event(room_id, &member_event.state_key) + .await? }; let old_display_name = if let Some(event) = old_event { diff --git a/matrix_sdk_common/src/deserialized_responses.rs b/matrix_sdk_common/src/deserialized_responses.rs index 052717b0..a3615ee6 100644 --- a/matrix_sdk_common/src/deserialized_responses.rs +++ b/matrix_sdk_common/src/deserialized_responses.rs @@ -180,11 +180,11 @@ impl JoinedRoom { unread_notifications: UnreadNotificationsCount, ) -> Self { Self { + unread_notifications, timeline, state, account_data, ephemeral, - unread_notifications, } } } diff --git a/matrix_sdk_crypto/src/olm/signing/mod.rs b/matrix_sdk_crypto/src/olm/signing/mod.rs index 1208edf1..bf004313 100644 --- a/matrix_sdk_crypto/src/olm/signing/mod.rs +++ b/matrix_sdk_crypto/src/olm/signing/mod.rs @@ -416,8 +416,8 @@ impl PrivateCrossSigningIdentity { UploadSigningKeysRequest { master_key, - user_signing_key, self_signing_key, + user_signing_key, } } } diff --git a/matrix_sdk_crypto/src/verification/sas/mod.rs b/matrix_sdk_crypto/src/verification/sas/mod.rs index 12b5f161..e190b190 100644 --- a/matrix_sdk_crypto/src/verification/sas/mod.rs +++ b/matrix_sdk_crypto/src/verification/sas/mod.rs @@ -422,10 +422,8 @@ impl Sas { } else { Some(r) } - } else if let Some(r) = identity_signature_request { - Some(r) } else { - None + identity_signature_request }; // TODO store the request as well.