refactor: Use variables directly in formatted strings (#7284)

made with `cargo clippy --all --fix` then manually reviewed to ensure
this was the only thing that changed.
This commit is contained in:
Simon Laux
2025-10-09 17:26:59 +02:00
committed by GitHub
parent 00ae7ce33c
commit af58b86b60
23 changed files with 55 additions and 76 deletions

View File

@@ -242,7 +242,7 @@ pub(crate) async fn smtp_send(
// Yandex error "554 5.7.1 [2] Message rejected under suspicion of SPAM; https://ya.cc/..."
// should definitely go here, because user has to open the link to
// resume message sending.
SendResult::Failure(format_err!("Permanent SMTP error: {}", err))
SendResult::Failure(format_err!("Permanent SMTP error: {err}"))
}
}
async_smtp::error::Error::Transient(ref response) => {
@@ -471,7 +471,7 @@ pub(crate) async fn send_msg_to_smtp(
}
Ok(())
}
SendResult::Failure(err) => Err(format_err!("{}", err)),
SendResult::Failure(err) => Err(format_err!("{err}")),
}
}
@@ -586,7 +586,7 @@ async fn send_mdn_rfc724_mid(
let addr = contact.get_addr();
let recipient = async_smtp::EmailAddress::new(addr.to_string())
.map_err(|err| format_err!("invalid recipient: {} {:?}", addr, err))?;
.map_err(|err| format_err!("invalid recipient: {addr} {err:?}"))?;
let recipients = vec![recipient];
match smtp_send(context, &recipients, &body, smtp, None).await {