Skip to content

Commit

Permalink
refactor: change Debug of Error to output url as str
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Jun 21, 2024
1 parent 29d4cff commit c4ebb07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/async_impl/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c4ebb07

Please sign in to comment.