mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 14:56:33 +03:00
Reduce code indentation
This commit is contained in:
35
src/imap.rs
35
src/imap.rs
@@ -2375,23 +2375,28 @@ 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) => {
|
||||||
context,
|
warn!(
|
||||||
"Could not add contact for recipient with address {:?}: {:#}", recipient.addr, err
|
|
||||||
),
|
|
||||||
Ok(recipient_addr) => {
|
|
||||||
let (_, modified) = Contact::add_or_lookup(
|
|
||||||
context,
|
context,
|
||||||
&display_name_normalized,
|
"Could not add contact for recipient with address {:?}: {:#}",
|
||||||
recipient_addr,
|
recipient.addr,
|
||||||
Origin::OutgoingTo,
|
err
|
||||||
)
|
);
|
||||||
.await?;
|
continue;
|
||||||
if modified != Modifier::None {
|
|
||||||
any_modified = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Ok(recipient_addr) => recipient_addr,
|
||||||
|
};
|
||||||
|
|
||||||
|
let (_, modified) = Contact::add_or_lookup(
|
||||||
|
context,
|
||||||
|
&display_name_normalized,
|
||||||
|
recipient_addr,
|
||||||
|
Origin::OutgoingTo,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
if modified != Modifier::None {
|
||||||
|
any_modified = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if any_modified {
|
if any_modified {
|
||||||
|
|||||||
Reference in New Issue
Block a user