matrix-sdk: Fix some newly introduced clippy warnings
parent
cad888e69b
commit
43b7072609
|
@ -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 })
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -180,11 +180,11 @@ impl JoinedRoom {
|
|||
unread_notifications: UnreadNotificationsCount,
|
||||
) -> Self {
|
||||
Self {
|
||||
unread_notifications,
|
||||
timeline,
|
||||
state,
|
||||
account_data,
|
||||
ephemeral,
|
||||
unread_notifications,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -416,8 +416,8 @@ impl PrivateCrossSigningIdentity {
|
|||
|
||||
UploadSigningKeysRequest {
|
||||
master_key,
|
||||
user_signing_key,
|
||||
self_signing_key,
|
||||
user_signing_key,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue