mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 13:06:28 +03:00
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`
This commit is contained in:
@@ -292,7 +292,7 @@ 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::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 @@ 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::Display::fmt(&it, f),
|
||||
VfsPathRepr::PathBuf(it) => fmt::Debug::fmt(&it, f),
|
||||
VfsPathRepr::VirtualPath(VirtualPath(it)) => fmt::Debug::fmt(&it, f),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user