Simplify VfsPath fmt
This commit is contained in:
parent
6d333e587d
commit
f5876aee1e
@ -292,8 +292,8 @@ fn from(v: AbsPathBuf) -> Self {
|
||||
impl fmt::Display for VfsPath {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match &self.0 {
|
||||
VfsPathRepr::PathBuf(it) => fmt::Display::fmt(&it, f),
|
||||
VfsPathRepr::VirtualPath(VirtualPath(it)) => fmt::Display::fmt(it, f),
|
||||
VfsPathRepr::PathBuf(it) => it.fmt(f),
|
||||
VfsPathRepr::VirtualPath(VirtualPath(it)) => it.fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -307,8 +307,8 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
impl fmt::Debug for VfsPathRepr {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match &self {
|
||||
VfsPathRepr::PathBuf(it) => fmt::Debug::fmt(&it, f),
|
||||
VfsPathRepr::VirtualPath(VirtualPath(it)) => fmt::Debug::fmt(&it, f),
|
||||
VfsPathRepr::PathBuf(it) => it.fmt(f),
|
||||
VfsPathRepr::VirtualPath(VirtualPath(it)) => it.fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user