crypto: Fix some clippy warnings.
parent
220ccfb52b
commit
4019ebf121
|
@ -278,16 +278,13 @@ impl KeyRequestMachine {
|
||||||
///
|
///
|
||||||
/// * `device_id` - The device id of the device that got the Olm session.
|
/// * `device_id` - The device id of the device that got the Olm session.
|
||||||
pub fn retry_keyshare(&self, user_id: &UserId, device_id: &DeviceId) {
|
pub fn retry_keyshare(&self, user_id: &UserId, device_id: &DeviceId) {
|
||||||
match self.users_for_key_claim.entry(user_id.to_owned()) {
|
if let Entry::Occupied(e) = self.users_for_key_claim.entry(user_id.to_owned()) {
|
||||||
Entry::Occupied(e) => {
|
|
||||||
e.get().remove(device_id);
|
e.get().remove(device_id);
|
||||||
|
|
||||||
if e.get().is_empty() {
|
if e.get().is_empty() {
|
||||||
e.remove();
|
e.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => (),
|
|
||||||
}
|
|
||||||
|
|
||||||
for (key, event) in self.wait_queue.remove(user_id, device_id) {
|
for (key, event) in self.wait_queue.remove(user_id, device_id) {
|
||||||
if !self.incoming_key_requests.contains_key(&key) {
|
if !self.incoming_key_requests.contains_key(&key) {
|
||||||
|
@ -376,7 +373,7 @@ impl KeyRequestMachine {
|
||||||
self.handle_key_share_without_session(device, event);
|
self.handle_key_share_without_session(device, event);
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
e => return Err(e.into()),
|
e => return Err(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue