Fix VfsPath Display and Debug impls

This commit is contained in:
hkalbasi 2023-06-20 23:17:42 +03:30
parent 7ebe7ac908
commit 10aba11b29

View file

@ -292,7 +292,7 @@ impl From<AbsPathBuf> for VfsPath {
impl fmt::Display for VfsPath {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.0 {
VfsPathRepr::PathBuf(it) => fmt::Debug::fmt(&it, f),
VfsPathRepr::PathBuf(it) => fmt::Display::fmt(&it, f),
VfsPathRepr::VirtualPath(VirtualPath(it)) => fmt::Display::fmt(it, f),
}
}
@ -307,7 +307,7 @@ impl fmt::Debug for VfsPath {
impl fmt::Debug for VfsPathRepr {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match &self {
VfsPathRepr::PathBuf(it) => fmt::Display::fmt(&it, f),
VfsPathRepr::PathBuf(it) => fmt::Debug::fmt(&it, f),
VfsPathRepr::VirtualPath(VirtualPath(it)) => fmt::Debug::fmt(&it, f),
}
}