refactor(backend): use async fn syntax per clippy lint
This commit is contained in:
@@ -39,16 +39,14 @@ pub async fn mw_ctx_resolver(
|
||||
impl<S: Send + Sync> FromRequestParts<S> for Ctx {
|
||||
type Rejection = LoftError;
|
||||
|
||||
fn from_request_parts(
|
||||
async fn from_request_parts(
|
||||
parts: &mut axum::http::request::Parts,
|
||||
_: &S,
|
||||
) -> impl Future<Output = Result<Self, Self::Rejection>> + Send {
|
||||
async move {
|
||||
parts
|
||||
.extensions
|
||||
.get::<Result<Ctx, LoftError>>()
|
||||
.ok_or(LoftError::AuthFailCtxNotInRequestExt)?
|
||||
.clone()
|
||||
}
|
||||
) -> Result<Self, Self::Rejection> {
|
||||
parts
|
||||
.extensions
|
||||
.get::<Result<Ctx, LoftError>>()
|
||||
.ok_or(LoftError::AuthFailCtxNotInRequestExt)?
|
||||
.clone()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user