diff --git a/core/http/src/cookies.rs b/core/http/src/cookies.rs index 11eb0870..7742f33c 100644 --- a/core/http/src/cookies.rs +++ b/core/http/src/cookies.rs @@ -414,8 +414,8 @@ impl<'a> Cookies<'a> { impl<'a> fmt::Debug for Cookies<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { - Cookies::Jarred(ref jar, _) => write!(f, "{:?}", jar), - Cookies::Empty(ref jar) => write!(f, "{:?}", jar) + Cookies::Jarred(ref jar, _) => jar.fmt(f), + Cookies::Empty(ref jar) => jar.fmt(f) } } } diff --git a/core/lib/src/error.rs b/core/lib/src/error.rs index 1b52af15..a253c49a 100644 --- a/core/lib/src/error.rs +++ b/core/lib/src/error.rs @@ -154,7 +154,7 @@ impl fmt::Debug for LaunchError { #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.mark_handled(); - write!(f, "{:?}", self.kind()) + self.kind().fmt(f) } } diff --git a/core/lib/src/response/response.rs b/core/lib/src/response/response.rs index bb081e6e..be47b261 100644 --- a/core/lib/src/response/response.rs +++ b/core/lib/src/response/response.rs @@ -1185,7 +1185,7 @@ impl<'r> fmt::Debug for Response<'r> { } match self.body { - Some(ref body) => writeln!(f, "{:?}", body), + Some(ref body) => body.fmt(f), None => writeln!(f, "Empty Body") } } diff --git a/core/lib/src/response/stream.rs b/core/lib/src/response/stream.rs index 58293d59..f91d5bea 100644 --- a/core/lib/src/response/stream.rs +++ b/core/lib/src/response/stream.rs @@ -36,7 +36,7 @@ impl Stream { impl Debug for Stream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Stream({:?})", self.0) + f.debug_tuple("Stream").field(&self.0).finish() } }