From c4ebb073438026e09c99469be02fc1f1a254058a Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Fri, 21 Jun 2024 10:29:46 -0400 Subject: [PATCH] refactor: change Debug of Error to output url as str --- src/async_impl/response.rs | 2 +- src/error.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/async_impl/response.rs b/src/async_impl/response.rs index 6e2544f96..17be37030 100644 --- a/src/async_impl/response.rs +++ b/src/async_impl/response.rs @@ -432,7 +432,7 @@ impl Response { impl fmt::Debug for Response { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("Response") - .field("url", self.url()) + .field("url", &self.url().as_str()) .field("status", &self.status()) .field("headers", self.headers()) .finish() diff --git a/src/error.rs b/src/error.rs index 12fca8b9c..b1c666479 100644 --- a/src/error.rs +++ b/src/error.rs @@ -172,7 +172,7 @@ impl fmt::Debug for Error { builder.field("kind", &self.inner.kind); if let Some(ref url) = self.inner.url { - builder.field("url", url); + builder.field("url", &url.as_str()); } if let Some(ref source) = self.inner.source { builder.field("source", source);