Flatten nested match for less indentation
parent
ca88539ec4
commit
7aea6160c3
|
@ -302,18 +302,14 @@ impl OlmMachine {
|
||||||
for (user_id, user_devices) in &response.one_time_keys {
|
for (user_id, user_devices) in &response.one_time_keys {
|
||||||
for (device_id, key_map) in user_devices {
|
for (device_id, key_map) in user_devices {
|
||||||
let device: Device = match self.store.get_device(&user_id, device_id).await {
|
let device: Device = match self.store.get_device(&user_id, device_id).await {
|
||||||
Ok(d) => {
|
Ok(Some(d)) => d,
|
||||||
if let Some(d) = d {
|
Ok(None) => {
|
||||||
d
|
|
||||||
} else {
|
|
||||||
warn!(
|
warn!(
|
||||||
"Tried to create an Olm session for {} {}, but \
|
"Tried to create an Olm session for {} {}, but the device is unknown",
|
||||||
the device is unknown",
|
|
||||||
user_id, device_id
|
user_id, device_id
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
warn!(
|
warn!(
|
||||||
"Tried to create an Olm session for {} {}, but \
|
"Tried to create an Olm session for {} {}, but \
|
||||||
|
|
Loading…
Reference in New Issue