diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2023-06-21 16:13:17 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2023-06-21 16:13:17 +0300 |
| commit | f5876aee1e7457961c4b0e1090789845768b876a (patch) | |
| tree | 87a18b3fb6c85fcab49f01b5b4d497cfe315dcac | |
| parent | 6d333e587d0563355d865babec9de44365f55fb5 (diff) | |
| download | rust-f5876aee1e7457961c4b0e1090789845768b876a.tar.gz rust-f5876aee1e7457961c4b0e1090789845768b876a.zip | |
Simplify VfsPath fmt
| -rw-r--r-- | crates/vfs/src/vfs_path.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/vfs/src/vfs_path.rs b/crates/vfs/src/vfs_path.rs index f88881488a6..52ada32bdfd 100644 --- a/crates/vfs/src/vfs_path.rs +++ b/crates/vfs/src/vfs_path.rs @@ -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), } } } |
