Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/vfs/src/lib.rs')
-rw-r--r--crates/vfs/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/vfs/src/lib.rs b/crates/vfs/src/lib.rs
index 34a85818eb..824ce39870 100644
--- a/crates/vfs/src/lib.rs
+++ b/crates/vfs/src/lib.rs
@@ -163,8 +163,8 @@ impl Vfs {
/// # Panics
///
/// Panics if the id is not present in the `Vfs`.
- pub fn file_path(&self, file_id: FileId) -> VfsPath {
- self.interner.lookup(file_id).clone()
+ pub fn file_path(&self, file_id: FileId) -> &VfsPath {
+ self.interner.lookup(file_id)
}
/// Returns an iterator over the stored ids and their corresponding paths.