Abide by formatting in 'Debug' implementations.

This commit is contained in:
Jacob Pratt 2019-09-14 00:07:19 -04:00 committed by Sergio Benitez
parent e3c1a4ad3a
commit bed93133b8
4 changed files with 5 additions and 5 deletions

View File

@ -403,8 +403,8 @@ impl Cookies<'_> {
impl fmt::Debug for Cookies<'_> {
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)
}
}
}

View File

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

View File

@ -1185,7 +1185,7 @@ impl fmt::Debug for Response<'_> {
}
match self.body {
Some(ref body) => writeln!(f, "{:?}", body),
Some(ref body) => body.fmt(f),
None => writeln!(f, "Empty Body")
}
}

View File

@ -36,7 +36,7 @@ impl<T: Read> Stream<T> {
impl<T: Read + Debug> Debug for Stream<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Stream({:?})", self.0)
f.debug_tuple("Stream").field(&self.0).finish()
}
}