mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-05 17:15:12 +00:00
remove unnessary conversions to itself
Reasons: - Remove unnecessary steps. into() is called on String when the expected type is already String. Signed-off-by: Perma Alesheikh <me@prma.dev>
This commit is contained in:
parent
a6440aaa27
commit
0b066b7529
|
@ -152,7 +152,7 @@ impl MessageReadCommand {
|
||||||
// display what can be displayed
|
// display what can be displayed
|
||||||
bodies.push_str(&String::from_utf8_lossy(email.raw()?));
|
bodies.push_str(&String::from_utf8_lossy(email.raw()?));
|
||||||
} else {
|
} else {
|
||||||
let tpl: String = email
|
let tpl = email
|
||||||
.to_read_tpl(&account_config, |mut tpl| {
|
.to_read_tpl(&account_config, |mut tpl| {
|
||||||
if self.no_headers {
|
if self.no_headers {
|
||||||
tpl = tpl.with_hide_all_headers();
|
tpl = tpl.with_hide_all_headers();
|
||||||
|
@ -166,8 +166,7 @@ impl MessageReadCommand {
|
||||||
|
|
||||||
tpl
|
tpl
|
||||||
})
|
})
|
||||||
.await?
|
.await?;
|
||||||
.into();
|
|
||||||
bodies.push_str(&tpl);
|
bodies.push_str(&tpl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ impl TemplateForwardCommand {
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let id = self.envelope.id;
|
let id = self.envelope.id;
|
||||||
let tpl: String = backend
|
let tpl = backend
|
||||||
.get_messages(folder, &[id])
|
.get_messages(folder, &[id])
|
||||||
.await?
|
.await?
|
||||||
.first()
|
.first()
|
||||||
|
@ -104,8 +104,7 @@ impl TemplateForwardCommand {
|
||||||
.with_headers(self.headers.raw)
|
.with_headers(self.headers.raw)
|
||||||
.with_body(self.body.raw())
|
.with_body(self.body.raw())
|
||||||
.build()
|
.build()
|
||||||
.await?
|
.await?;
|
||||||
.into();
|
|
||||||
|
|
||||||
printer.print(tpl)
|
printer.print(tpl)
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ impl TemplateReplyCommand {
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let tpl: String = backend
|
let tpl = backend
|
||||||
.get_messages(folder, &[id])
|
.get_messages(folder, &[id])
|
||||||
.await?
|
.await?
|
||||||
.first()
|
.first()
|
||||||
|
@ -109,8 +109,7 @@ impl TemplateReplyCommand {
|
||||||
.with_body(self.body.raw())
|
.with_body(self.body.raw())
|
||||||
.with_reply_all(self.reply.all)
|
.with_reply_all(self.reply.all)
|
||||||
.build()
|
.build()
|
||||||
.await?
|
.await?;
|
||||||
.into();
|
|
||||||
|
|
||||||
printer.print(tpl)
|
printer.print(tpl)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue