mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 23:36:30 +03:00
Reduce code indentation
This commit is contained in:
19
src/imap.rs
19
src/imap.rs
@@ -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));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user