mirror of https://github.com/helix-editor/helix
appease clippy
parent
48481db8ca
commit
fc34efea12
|
@ -1049,10 +1049,9 @@ impl Document {
|
||||||
let cwdir = std::env::current_dir().expect("couldn't determine current directory");
|
let cwdir = std::env::current_dir().expect("couldn't determine current directory");
|
||||||
|
|
||||||
self.path.as_ref().map(|path| {
|
self.path.as_ref().map(|path| {
|
||||||
let path = if path.is_relative() {
|
let mut path = path.as_path();
|
||||||
path.as_path()
|
if path.is_absolute() {
|
||||||
} else {
|
path = path.strip_prefix(cwdir).unwrap_or(path)
|
||||||
path.strip_prefix(cwdir).unwrap_or(path.as_path())
|
|
||||||
};
|
};
|
||||||
fold_home_dir(path)
|
fold_home_dir(path)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue