mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 15:36:30 +03:00
Reduce number of AsRef generics
They result in compilation of duplicate code.
This commit is contained in:
@@ -1101,11 +1101,11 @@ impl MimeMessage {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn repl_msg_by_error(&mut self, error_msg: impl AsRef<str>) {
|
||||
pub fn repl_msg_by_error(&mut self, error_msg: &str) {
|
||||
self.is_system_message = SystemMessage::Unknown;
|
||||
if let Some(part) = self.parts.first_mut() {
|
||||
part.typ = Viewtype::Text;
|
||||
part.msg = format!("[{}]", error_msg.as_ref());
|
||||
part.msg = format!("[{}]", error_msg);
|
||||
self.parts.truncate(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user