From a6440aaa2785a177f6074a084dedd695f1ae015c Mon Sep 17 00:00:00 2001 From: Perma Alesheikh Date: Tue, 9 Jan 2024 14:29:51 +0330 Subject: [PATCH] remove unnecessary into_owned Reasons: - Remove unnecessary step. - Avoid allocation when not needed. Signed-off-by: Perma Alesheikh --- src/email/message/command/read.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/email/message/command/read.rs b/src/email/message/command/read.rs index dd4dd4c..91f1e6c 100644 --- a/src/email/message/command/read.rs +++ b/src/email/message/command/read.rs @@ -150,7 +150,7 @@ impl MessageReadCommand { if self.raw { // emails do not always have valid utf8, uses "lossy" to // display what can be displayed - bodies.push_str(&String::from_utf8_lossy(email.raw()?).into_owned()); + bodies.push_str(&String::from_utf8_lossy(email.raw()?)); } else { let tpl: String = email .to_read_tpl(&account_config, |mut tpl| {