fix: clippy warnings

This commit is contained in:
GGORG 2025-04-27 14:44:24 +02:00
parent f0d9126652
commit 05063a74f8
No known key found for this signature in database
GPG key ID: CB7ED12349447239
2 changed files with 9 additions and 13 deletions

View file

@ -102,17 +102,13 @@ impl IntoResponse for ExtractorError {
impl IntoResponse for Error { impl IntoResponse for Error {
fn into_response(self) -> axum_core::response::Response { fn into_response(self) -> axum_core::response::Response {
dbg!(&self); dbg!(&self);
match self { (StatusCode::INTERNAL_SERVER_ERROR, "internal server error").into_response()
_ => (StatusCode::INTERNAL_SERVER_ERROR, "internal server error").into_response(),
}
} }
} }
impl IntoResponse for MiddlewareError { impl IntoResponse for MiddlewareError {
fn into_response(self) -> axum_core::response::Response { fn into_response(self) -> axum_core::response::Response {
dbg!(&self); dbg!(&self);
match self { (StatusCode::INTERNAL_SERVER_ERROR, "internal server error").into_response()
_ => (StatusCode::INTERNAL_SERVER_ERROR, "internal server error").into_response(),
}
} }
} }

View file

@ -495,18 +495,18 @@ async fn try_refresh_token<AC: AdditionalClaims>(
} }
} }
/// `openidconnect::reqwest::async_http_client` that uses a custom `reqwest::client` type AsyncHttpClient<'a> = Pin<
fn async_http_client<'a>(
client: &'a reqwest::Client,
) -> impl FnOnce(
HttpRequest,
) -> Pin<
Box< Box<
dyn Future<Output = Result<HttpResponse, openidconnect::reqwest::Error<reqwest::Error>>> dyn Future<Output = Result<HttpResponse, openidconnect::reqwest::Error<reqwest::Error>>>
+ Send + Send
+ 'a, + 'a,
>, >,
> { >;
/// `openidconnect::reqwest::async_http_client` that uses a custom `reqwest::client`
fn async_http_client<'a>(
client: &'a reqwest::Client,
) -> impl FnOnce(HttpRequest) -> AsyncHttpClient<'a> {
move |request: HttpRequest| { move |request: HttpRequest| {
Box::pin(async move { Box::pin(async move {
let mut request_builder = client let mut request_builder = client