From 9991b85f1f020ff26325c62225b5fc2342a73cb5 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 16 Sep 2022 22:56:25 +0200 Subject: [PATCH] Use regular non-exhaustive debug representation instead of custom one (#1380) --- axum/src/handler/into_service.rs | 4 +--- axum/src/macros.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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() } }