Use regular non-exhaustive debug representation instead of custom one (#1380)

This commit is contained in:
Jonas Platte 2022-09-16 22:56:25 +02:00 committed by GitHub
parent c8dbe5a7e9
commit c09ecefcab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View file

@ -47,9 +47,7 @@ impl<H, T, S, B> IntoService<H, T, S, B> {
impl<H, T, S, B> fmt::Debug for IntoService<H, T, S, B> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("IntoService")
.field(&format_args!("..."))
.finish()
f.debug_struct("IntoService").finish_non_exhaustive()
}
}

View file

@ -33,9 +33,8 @@ impl<H, T, S, B> IntoServiceStateInExtension<H, T, S, B> {
impl<H, T, S, B> fmt::Debug for IntoServiceStateInExtension<H, T, S, B> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("IntoServiceStateInExtension")
.field(&format_args!("..."))
.finish()
f.debug_struct("IntoServiceStateInExtension")
.finish_non_exhaustive()
}
}

View file

@ -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()
}
}