Skip to content

Commit

Permalink
appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jul 5, 2021
1 parent 48481db commit fc34efe
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions helix-view/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1049,10 +1049,9 @@ impl Document {
let cwdir = std::env::current_dir().expect("couldn't determine current directory");

self.path.as_ref().map(|path| {
let path = if path.is_relative() {
path.as_path()
} else {
path.strip_prefix(cwdir).unwrap_or(path.as_path())
let mut path = path.as_path();
if path.is_absolute() {
path = path.strip_prefix(cwdir).unwrap_or(path)
};
fold_home_dir(path)
})
Expand Down

0 comments on commit fc34efe

Please sign in to comment.