Reduce code indentation

This commit is contained in:
link2xt
2023-01-11 23:19:07 +00:00
parent 89c8d26968
commit 790512d52a

View File

@@ -2375,12 +2375,19 @@ async fn add_all_recipients_as_contacts(
.map(|s| normalize_name(s)) .map(|s| normalize_name(s))
.unwrap_or_default(); .unwrap_or_default();
match ContactAddress::new(&recipient.addr) { let recipient_addr = match ContactAddress::new(&recipient.addr) {
Err(err) => warn!( Err(err) => {
warn!(
context, context,
"Could not add contact for recipient with address {:?}: {:#}", recipient.addr, err "Could not add contact for recipient with address {:?}: {:#}",
), recipient.addr,
Ok(recipient_addr) => { err
);
continue;
}
Ok(recipient_addr) => recipient_addr,
};
let (_, modified) = Contact::add_or_lookup( let (_, modified) = Contact::add_or_lookup(
context, context,
&display_name_normalized, &display_name_normalized,
@@ -2392,8 +2399,6 @@ async fn add_all_recipients_as_contacts(
any_modified = true; any_modified = true;
} }
} }
}
}
if any_modified { if any_modified {
context.emit_event(EventType::ContactsChanged(None)); context.emit_event(EventType::ContactsChanged(None));
} }