From b561389175b2ec832c7067a9a4e1da80314a0a60 Mon Sep 17 00:00:00 2001 From: stefiosif Date: Sat, 30 May 2026 00:44:04 +0300 Subject: [PATCH] refactor(backend): use async fn syntax per clippy lint --- backend/src/web/mw_auth.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) 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() } }