Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2d64a0a

Browse files
committed
Auto merge of rust-lang#15097 - HKalbasi:abs-path-display, r=matklad
Fix VfsPath Display and Debug impls fix rust-lang/rust-analyzer#15087 (comment) r? `@matklad`
2 parents 7ebe7ac + 10aba11 commit 2d64a0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/vfs/src/vfs_path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ impl From<AbsPathBuf> for VfsPath {
292292
impl fmt::Display for VfsPath {
293293
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
294294
match &self.0 {
295-
VfsPathRepr::PathBuf(it) => fmt::Debug::fmt(&it, f),
295+
VfsPathRepr::PathBuf(it) => fmt::Display::fmt(&it, f),
296296
VfsPathRepr::VirtualPath(VirtualPath(it)) => fmt::Display::fmt(it, f),
297297
}
298298
}
@@ -307,7 +307,7 @@ impl fmt::Debug for VfsPath {
307307
impl fmt::Debug for VfsPathRepr {
308308
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
309309
match &self {
310-
VfsPathRepr::PathBuf(it) => fmt::Display::fmt(&it, f),
310+
VfsPathRepr::PathBuf(it) => fmt::Debug::fmt(&it, f),
311311
VfsPathRepr::VirtualPath(VirtualPath(it)) => fmt::Debug::fmt(&it, f),
312312
}
313313
}

0 commit comments

Comments
 (0)