internal: use consistent style for error handling

This commit is contained in:
Alex Kladov 2023-06-19 13:01:47 +01:00
parent 49318bbae7
commit 6303551cb8
22 changed files with 128 additions and 134 deletions

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::Display::fmt(&it.display(), f),
VfsPathRepr::PathBuf(it) => fmt::Debug::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::Debug::fmt(&it.display(), f),
VfsPathRepr::PathBuf(it) => fmt::Display::fmt(&it, f),
VfsPathRepr::VirtualPath(VirtualPath(it)) => fmt::Debug::fmt(&it, f),
}
}