crypto: Collapse an if tree.
parent
23173c4a1e
commit
721c459577
|
@ -360,19 +360,17 @@ 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()))
|
{
|
||||||
{
|
Ok(())
|
||||||
Ok(())
|
|
||||||
} else {
|
|
||||||
Err(KeyshareDecision::OutboundSessionNotShared)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Err(KeyshareDecision::MissingOutboundSession)
|
Err(KeyshareDecision::OutboundSessionNotShared)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Err(KeyshareDecision::MissingOutboundSession)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue