diff options
author | mo8it | 2024-02-29 23:18:12 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2024-03-19 05:39:46 +0000 |
commit | e91ec8e880062c1822d08f47dac48dffeab4548f (patch) | |
tree | e9a57487a9da580bf54428e0a8eb1be692e7c1af /helix-view | |
parent | 6ed93b6e49df2499cd32cc4e4f6dcfe6d416c907 (diff) |
Optimize getting a relative path
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/src/document.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 4e7b1de9..5f3595ee 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1685,7 +1685,7 @@ impl Document { &self.selections } - pub fn relative_path(&self) -> Option<PathBuf> { + pub fn relative_path(&self) -> Option<Cow<Path>> { self.path .as_deref() .map(helix_stdx::path::get_relative_path) |