Comments
Patch
@@ -7,6 +7,7 @@
use std::borrow::Borrow;
use std::ffi::{OsStr, OsString};
+use std::fmt;
use std::ops::Deref;
use std::path::{Path, PathBuf};
@@ -162,6 +163,12 @@
}
}
+impl fmt::Display for HgPath {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "{}", String::from_utf8_lossy(&self.inner))
+ }
+}
+
#[derive(Eq, Ord, Clone, PartialEq, PartialOrd, Debug, Hash)]
pub struct HgPathBuf {
inner: Vec<u8>,
@@ -185,6 +192,12 @@
}
}
+impl fmt::Display for HgPathBuf {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "{}", String::from_utf8_lossy(&self.inner))
+ }
+}
+
impl Deref for HgPathBuf {
type Target = HgPath;