crypto: Collapse an if tree.

master
Damir Jelić 2020-09-28 15:07:57 +02:00
parent 23173c4a1e
commit 721c459577
1 changed files with 9 additions and 11 deletions

View File

@ -360,8 +360,7 @@ impl KeyRequestMachine {
} else { } else {
Err(KeyshareDecision::UntrustedDevice) Err(KeyshareDecision::UntrustedDevice)
} }
} else { } else if let Some(outbound) = outbound_session {
if let Some(outbound) = outbound_session {
if outbound if outbound
.shared_with() .shared_with()
.contains(&(device.user_id().to_owned(), device.device_id().to_owned())) .contains(&(device.user_id().to_owned(), device.device_id().to_owned()))
@ -374,7 +373,6 @@ impl KeyRequestMachine {
Err(KeyshareDecision::MissingOutboundSession) Err(KeyshareDecision::MissingOutboundSession)
} }
} }
}
/// Create a new outgoing key request for the key with the given session id. /// Create a new outgoing key request for the key with the given session id.
/// ///