diff --git a/src/client/legacy/client.rs b/src/client/legacy/client.rs index c638db6..6ed7c0f 100644 --- a/src/client/legacy/client.rs +++ b/src/client/legacy/client.rs @@ -52,7 +52,6 @@ struct Config { } /// Client errors -#[derive(Debug)] pub struct Error { kind: ErrorKind, source: Option>, @@ -1566,6 +1565,17 @@ impl fmt::Debug for Builder { // ==== impl Error ==== +impl fmt::Debug for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut f = f.debug_tuple("hyper_util::client::legacy::Error"); + f.field(&self.kind); + if let Some(ref cause) = self.cause { + f.field(cause); + } + f.finish() + } +} + impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "client error ({:?})", self.kind)