From 5d0e2c0c44ee6a95faa90381859697f9c3c42ccd Mon Sep 17 00:00:00 2001 From: Leon Lux Date: Sat, 2 Nov 2024 16:41:08 +0100 Subject: [PATCH] use tracing error correctly --- axum-extra/src/response/error_response.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/axum-extra/src/response/error_response.rs b/axum-extra/src/response/error_response.rs index f22c2e3e94..364b83f050 100644 --- a/axum-extra/src/response/error_response.rs +++ b/axum-extra/src/response/error_response.rs @@ -29,8 +29,8 @@ pub struct InternalServerError(pub T); impl IntoResponse for InternalServerError { fn into_response(self) -> Response { - let mut e: &dyn Error = &self.0; - error!(error = e); + let err = &self.0; + error!(%err); ( StatusCode::INTERNAL_SERVER_ERROR, "An error occurred while processing your request.",