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