Provide url in Response Debug impl

This commit is contained in:
Martin Algesten
2021-03-24 20:26:44 +01:00
parent 3044ae7efd
commit cfaca317c6

View File

@@ -79,10 +79,14 @@ impl fmt::Debug for Response {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
"Response[status: {}, status_text: {}]",
"Response[status: {}, status_text: {}",
self.status(),
self.status_text()
)
self.status_text(),
)?;
if let Some(url) = &self.url {
write!(f, ", url: {}", url)?;
}
write!(f, "]")
}
}