Box large futures
This commit is contained in:
@@ -649,7 +649,7 @@ async fn delivery_diagnose(
|
||||
if r.is_positive_completion() {
|
||||
Ok(r)
|
||||
} else {
|
||||
Err(ClientError::UnexpectedReply(r))
|
||||
Err(ClientError::UnexpectedReply(Box::new(r)))
|
||||
}
|
||||
}) {
|
||||
Ok(_) => {
|
||||
@@ -669,7 +669,7 @@ async fn delivery_diagnose(
|
||||
if r.is_positive_completion() {
|
||||
Ok(r)
|
||||
} else {
|
||||
Err(ClientError::UnexpectedReply(r))
|
||||
Err(ClientError::UnexpectedReply(Box::new(r)))
|
||||
}
|
||||
}) {
|
||||
Ok(_) => {
|
||||
|
||||
@@ -71,10 +71,10 @@ impl ManagementApi for Server {
|
||||
"auth" if is_post => {
|
||||
self.is_http_anonymous_request_allowed(session.remote_ip)
|
||||
.await?;
|
||||
self.handle_login_request(
|
||||
Box::pin(self.handle_login_request(
|
||||
session,
|
||||
body.ok_or_else(|| trc::LimitEvent::SizeRequest.into_err())?,
|
||||
)
|
||||
))
|
||||
.await
|
||||
}
|
||||
"discover" => {
|
||||
|
||||
@@ -82,13 +82,12 @@ impl Authenticator for Server {
|
||||
};
|
||||
|
||||
// Authenticate
|
||||
let access_token = self
|
||||
.authenticate(&AuthRequest::from_credentials(
|
||||
credentials,
|
||||
session.session_id,
|
||||
session.remote_ip,
|
||||
))
|
||||
.await?;
|
||||
let access_token = Box::pin(self.authenticate(&AuthRequest::from_credentials(
|
||||
credentials,
|
||||
session.session_id,
|
||||
session.remote_ip,
|
||||
)))
|
||||
.await?;
|
||||
|
||||
// Cache credentials
|
||||
self.inner.cache.http_auth.insert(
|
||||
|
||||
@@ -49,7 +49,7 @@ impl ClientRegistrationHandler for Server {
|
||||
) -> trc::Result<HttpResponse> {
|
||||
let tenant_id = if !self.core.oauth.allow_anonymous_client_registration {
|
||||
// Authenticate request
|
||||
let (_, access_token) = self.authenticate_headers(req, &session).await?;
|
||||
let (_, access_token) = Box::pin(self.authenticate_headers(req, &session)).await?;
|
||||
|
||||
// Validate permissions
|
||||
access_token.enforce_permission(Permission::OAuthClientRegistration)?;
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
||||
*/
|
||||
|
||||
#![deny(clippy::large_futures)]
|
||||
|
||||
pub mod api;
|
||||
pub mod auth;
|
||||
pub mod form;
|
||||
|
||||
Reference in New Issue
Block a user