crypto: Fix some clippy warnings.
parent
a3bb8a0d74
commit
e431ba0bf5
|
@ -138,13 +138,12 @@ impl VerificationMachine {
|
|||
AnyToDeviceEvent::KeyVerificationMac(e) => {
|
||||
if let Some(s) = self.get_sas(&e.content.transaction_id) {
|
||||
self.receive_event_helper(&s, event);
|
||||
if s.is_done() {
|
||||
if !s.mark_device_as_verified().await? {
|
||||
|
||||
if s.is_done() && !s.mark_device_as_verified().await? {
|
||||
if let Some(r) = s.cancel() {
|
||||
self.outgoing_to_device_messages.insert(r.txn_id.clone(), r);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
_ => (),
|
||||
|
|
|
@ -162,11 +162,9 @@ impl Sas {
|
|||
(content, guard.is_done())
|
||||
};
|
||||
|
||||
if done {
|
||||
if !self.mark_device_as_verified().await? {
|
||||
if done && !self.mark_device_as_verified().await? {
|
||||
return Ok(self.cancel());
|
||||
}
|
||||
}
|
||||
|
||||
Ok(content.map(|c| {
|
||||
let content = AnyToDeviceEventContent::KeyVerificationMac(c);
|
||||
|
|
Loading…
Reference in New Issue