Box large futures

This commit is contained in:
Maurus Decimus
2026-04-19 08:11:56 +02:00
parent c0d0ac9ea3
commit af23099e35
72 changed files with 1267 additions and 1469 deletions

View File

@@ -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.")),

View File

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

View File

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