Update <simple_git::GitUrl as Display>::fmt impl (#1582)

Forward it to `<gix::Url as Display>::fmt` now that `gix::Url`
implements `Display`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-01-21 02:42:49 +10:00 committed by GitHub
parent 32b73b1ee9
commit 70ebed3702
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
}
}