remove unnecessary into_owned

Reasons:
- Remove unnecessary step.
- Avoid allocation when not needed.

Signed-off-by: Perma Alesheikh <me@prma.dev>
This commit is contained in:
Perma Alesheikh 2024-01-09 14:29:51 +03:30 committed by Clément DOUIN
parent 2af1936ef8
commit a6440aaa27
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72

View file

@ -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| {