From bc1084a9f5c2635c524453b6c1387258907fd7e7 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sat, 7 Nov 2020 19:58:23 -0600 Subject: [PATCH] uucore/refactor ~ fix `cargo clippy` complaints (or_fun_call) --- src/uucore/src/lib/features/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uucore/src/lib/features/fs.rs b/src/uucore/src/lib/features/fs.rs index d1c0a3f7c..6fda8460a 100644 --- a/src/uucore/src/lib/features/fs.rs +++ b/src/uucore/src/lib/features/fs.rs @@ -39,7 +39,7 @@ pub fn resolve_relative_path(path: &Path) -> Cow { return path.into(); } let root = Component::RootDir.as_os_str(); - let mut result = env::current_dir().unwrap_or(PathBuf::from(root)); + let mut result = env::current_dir().unwrap_or_else(|_| PathBuf::from(root)); for comp in path.components() { match comp { Component::ParentDir => {