Remove the remaining AsRef<str> (#3669)

Using &str instead of AsRef is better for compile times, binary size and code complexity.
This commit is contained in:
iequidoo
2022-11-28 14:00:34 -03:00
committed by iequidoo
parent e5be023e4b
commit f6a502a8e3
16 changed files with 153 additions and 167 deletions

View File

@@ -429,7 +429,7 @@ impl<'a> MimeFactory<'a> {
}
}
let self_name = match context.get_config(Config::Displayname).await? {
let self_name = &match context.get_config(Config::Displayname).await? {
Some(name) => name,
None => context.get_config(Config::Addr).await?.unwrap_or_default(),
};
@@ -1259,7 +1259,7 @@ impl<'a> MimeFactory<'a> {
.truncated_text(32)
.to_string()
};
let p2 = stock_str::read_rcpt_mail_body(context, p1).await;
let p2 = stock_str::read_rcpt_mail_body(context, &p1).await;
let message_text = format!("{}\r\n", format_flowed(&p2));
message = message.child(
PartBuilder::new()