Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r--helix-view/src/document.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 4b3e1bba..ec88266b 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -2015,8 +2015,8 @@ impl Document {
#[inline]
/// File path on disk.
- pub fn path(&self) -> Option<&PathBuf> {
- self.path.as_ref()
+ pub fn path(&self) -> Option<&Path> {
+ self.path.as_deref()
}
/// File path as a URL.
@@ -2025,7 +2025,7 @@ impl Document {
}
pub fn uri(&self) -> Option<helix_core::Uri> {
- Some(self.path()?.clone().into())
+ Some(self.path()?.into())
}
#[inline]