diff --git a/backend/src/web/mw_auth.rs b/backend/src/web/mw_auth.rs index 562db17..a87b755 100644 --- a/backend/src/web/mw_auth.rs +++ b/backend/src/web/mw_auth.rs @@ -39,16 +39,14 @@ pub async fn mw_ctx_resolver( impl FromRequestParts for Ctx { type Rejection = LoftError; - fn from_request_parts( + async fn from_request_parts( parts: &mut axum::http::request::Parts, _: &S, - ) -> impl Future> + Send { - async move { - parts - .extensions - .get::>() - .ok_or(LoftError::AuthFailCtxNotInRequestExt)? - .clone() - } + ) -> Result { + parts + .extensions + .get::>() + .ok_or(LoftError::AuthFailCtxNotInRequestExt)? + .clone() } }