Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #15097 - HKalbasi:abs-path-display, r=matklad
Fix VfsPath Display and Debug impls fix https://github.com/rust-lang/rust-analyzer/pull/15087#discussion_r1234544484 r? `@matklad`
bors 2023-06-21
parent 7ebe7ac · parent 10aba11 · commit 2d64a0a
-rw-r--r--crates/vfs/src/vfs_path.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/vfs/src/vfs_path.rs b/crates/vfs/src/vfs_path.rs
index f9248feb34..f88881488a 100644
--- a/crates/vfs/src/vfs_path.rs
+++ b/crates/vfs/src/vfs_path.rs
@@ -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),
}
}