mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 22:54:00 +00:00
Auto merge of #15100 - lnicola:vfs-path-fmt, r=Veykril
internal: Simplify `VfsPath` `fmt` impls Fixes https://github.com/rust-lang/rust-analyzer/pull/15097#discussion_r1236169290
This commit is contained in:
commit
ae22869e36
1 changed files with 4 additions and 4 deletions
|
@ -292,8 +292,8 @@ 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, f),
|
||||
VfsPathRepr::VirtualPath(VirtualPath(it)) => fmt::Display::fmt(it, f),
|
||||
VfsPathRepr::PathBuf(it) => it.fmt(f),
|
||||
VfsPathRepr::VirtualPath(VirtualPath(it)) => it.fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -307,8 +307,8 @@ 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, f),
|
||||
VfsPathRepr::VirtualPath(VirtualPath(it)) => fmt::Debug::fmt(&it, f),
|
||||
VfsPathRepr::PathBuf(it) => it.fmt(f),
|
||||
VfsPathRepr::VirtualPath(VirtualPath(it)) => it.fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue