Skip to content

Commit

Permalink
Auto merge of #15100 - lnicola:vfs-path-fmt, r=Veykril
Browse files Browse the repository at this point in the history
internal: Simplify `VfsPath` `fmt` impls

Fixes #15097 (comment)
  • Loading branch information
bors committed Jun 21, 2023
2 parents fe43be5 + f5876ae commit ae22869
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/vfs/src/vfs_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}
}
Expand All @@ -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),
}
}
}
Expand Down

0 comments on commit ae22869

Please sign in to comment.