diff --git a/axum/src/handler/into_service.rs b/axum/src/handler/into_service.rs index 34f36b2d..7ccbd335 100644 --- a/axum/src/handler/into_service.rs +++ b/axum/src/handler/into_service.rs @@ -35,9 +35,7 @@ impl IntoService { impl fmt::Debug for IntoService { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_tuple("IntoService") - .field(&format_args!("...")) - .finish() + f.debug_struct("IntoService").finish_non_exhaustive() } } diff --git a/axum/src/macros.rs b/axum/src/macros.rs index d26cc87c..6bbebb3c 100644 --- a/axum/src/macros.rs +++ b/axum/src/macros.rs @@ -24,7 +24,7 @@ macro_rules! opaque_future { impl<$($param),*> std::fmt::Debug for $name<$($param),*> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_tuple(stringify!($name)).field(&format_args!("...")).finish() + f.debug_struct(stringify!($name)).finish_non_exhaustive() } }