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