Skip to content

Commit

Permalink
Implement fmt::Display for HeaderValue
Browse files Browse the repository at this point in the history
  • Loading branch information
caspervonb authored and Jarema committed Aug 11, 2023
1 parent a59b21e commit b26262b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions async-nats/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ pub struct HeaderValue {
inner: String,
}

impl ToString for HeaderValue {
fn to_string(&self) -> String {
self.inner.to_string()
impl fmt::Display for HeaderValue {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&self.as_str(), f)
}
}

Expand Down

0 comments on commit b26262b

Please sign in to comment.