mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Fix VfsPath Display and Debug impls
This commit is contained in:
parent
7ebe7ac908
commit
10aba11b29
@ -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),
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user