Skip to content

Commit

Permalink
Update <simple_git::GitUrl as Display>::fmt impl (#1582)
Browse files Browse the repository at this point in the history
Forward it to `<gix::Url as Display>::fmt` now that `gix::Url`
implements `Display`

Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu authored Jan 20, 2024
1 parent 32b73b1 commit 70ebed3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crates/simple-git/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ pub struct GitUrl(Url);

impl fmt::Display for GitUrl {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let url_bstr = self.0.to_bstring();
let url_str = String::from_utf8_lossy(&url_bstr);

f.write_str(&url_str)
fmt::Display::fmt(&self.0, f)
}
}

Expand Down

0 comments on commit 70ebed3

Please sign in to comment.