mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 02:16:29 +03:00
Inline format arguments
This feature has been stable since Rust 1.58.0.
This commit is contained in:
@@ -716,7 +716,7 @@ impl<'a> MimeFactory<'a> {
|
||||
}
|
||||
let message = message.replace_header(Header::new(
|
||||
"Content-Type".to_string(),
|
||||
format!("{} protected-headers=\"v1\";", existing_ct),
|
||||
format!("{existing_ct} protected-headers=\"v1\";"),
|
||||
));
|
||||
|
||||
// Set the appropriate Content-Type for the outer message
|
||||
@@ -1234,7 +1234,7 @@ impl<'a> MimeFactory<'a> {
|
||||
Some(path) => match build_selfavatar_file(context, &path).await {
|
||||
Ok(avatar) => headers.hidden.push(Header::new(
|
||||
"Chat-User-Avatar".into(),
|
||||
format!("base64:{}", avatar),
|
||||
format!("base64:{avatar}"),
|
||||
)),
|
||||
Err(err) => warn!(context, "mimefactory: cannot attach selfavatar: {}", err),
|
||||
},
|
||||
@@ -1470,7 +1470,7 @@ fn render_rfc724_mid(rfc724_mid: &str) -> String {
|
||||
if rfc724_mid.chars().next().unwrap_or_default() == '<' {
|
||||
rfc724_mid
|
||||
} else {
|
||||
format!("<{}>", rfc724_mid)
|
||||
format!("<{rfc724_mid}>")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1535,7 +1535,7 @@ mod tests {
|
||||
Address::new_mailbox_with_name(display_name.to_string(), addr.to_string())
|
||||
);
|
||||
|
||||
println!("{}", s);
|
||||
println!("{s}");
|
||||
|
||||
assert_eq!(s, "=?utf-8?q?=C3=A4_space?= <x@y.org>");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user