Box large futures
This commit is contained in:
@@ -100,11 +100,11 @@ impl<T: SessionStream> Session<T> {
|
||||
} else {
|
||||
unreachable!()
|
||||
};
|
||||
self.handle_auth(Credentials::Basic {
|
||||
Box::pin(self.handle_auth(Credentials::Basic {
|
||||
username,
|
||||
secret: string,
|
||||
mfa_token: None,
|
||||
})
|
||||
}))
|
||||
.await
|
||||
.map(|_| SessionResult::Continue)
|
||||
}
|
||||
@@ -147,10 +147,11 @@ impl<T: SessionStream> Session<T> {
|
||||
self.handle_stls().await.map(|_| SessionResult::UpgradeTls)
|
||||
}
|
||||
Command::Utf8 => self.handle_utf8().await.map(|_| SessionResult::Continue),
|
||||
Command::Auth { mechanism, params } => self
|
||||
.handle_sasl(mechanism, params)
|
||||
.await
|
||||
.map(|_| SessionResult::Continue),
|
||||
Command::Auth { mechanism, params } => Box::pin(
|
||||
self.handle_sasl(mechanism, params),
|
||||
)
|
||||
.await
|
||||
.map(|_| SessionResult::Continue),
|
||||
Command::Apop { .. } => Err(trc::Pop3Event::Error
|
||||
.into_err()
|
||||
.details("APOP not supported.")),
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
||||
*/
|
||||
|
||||
#![deny(clippy::large_futures)]
|
||||
|
||||
use std::{net::IpAddr, sync::Arc};
|
||||
|
||||
use common::{
|
||||
|
||||
@@ -39,7 +39,7 @@ impl<T: SessionStream> Session<T> {
|
||||
.details("Invalid SASL challenge")
|
||||
})?;
|
||||
|
||||
self.handle_auth(credentials).await
|
||||
Box::pin(self.handle_auth(credentials)).await
|
||||
} else {
|
||||
// TODO: This hack is temporary until the SASL library is developed
|
||||
self.receiver.state = request::State::Argument {
|
||||
|
||||
Reference in New Issue
Block a user