mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 01:46:30 +03:00
Get rid of unnecessary "async move" and ".await"
This commit is contained in:
@@ -57,10 +57,10 @@ impl Smtp {
|
|||||||
message,
|
message,
|
||||||
);
|
);
|
||||||
if let Some(ref mut transport) = self.transport {
|
if let Some(ref mut transport) = self.transport {
|
||||||
let res = async_std::future::timeout(Duration::from_secs(SEND_TIMEOUT), async move {
|
let res =
|
||||||
transport.send(mail).await.map_err(Error::SendError)
|
async_std::future::timeout(Duration::from_secs(SEND_TIMEOUT), transport.send(mail))
|
||||||
})
|
.await?
|
||||||
.await?;
|
.map_err(Error::SendError);
|
||||||
|
|
||||||
res.map(|_response| {
|
res.map(|_response| {
|
||||||
context.call_cb(Event::SmtpMessageSent(format!(
|
context.call_cb(Event::SmtpMessageSent(format!(
|
||||||
|
|||||||
Reference in New Issue
Block a user