appease clippy
This commit is contained in:
parent
48481db8ca
commit
fc34efea12
@ -1049,10 +1049,9 @@ pub fn relative_path(&self) -> Option<PathBuf> {
|
||||
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)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user