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-term/src | |
parent | 6ed93b6e49df2499cd32cc4e4f6dcfe6d416c907 (diff) |
Optimize getting a relative path
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/ui/statusline.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs index c3464067..7437cbd0 100644 --- a/helix-term/src/ui/statusline.rs +++ b/helix-term/src/ui/statusline.rs @@ -482,7 +482,7 @@ where let rel_path = context.doc.relative_path(); let path = rel_path .as_ref() - .and_then(|p| p.as_path().file_name().map(|s| s.to_string_lossy())) + .and_then(|p| p.file_name().map(|s| s.to_string_lossy())) .unwrap_or_else(|| SCRATCH_BUFFER_NAME.into()); format!(" {} ", path) }; |