1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 20:47:46 +00:00

unwrap_or_else can be an unwrap_or

This commit is contained in:
electricboogie 2021-04-25 12:58:04 -05:00
parent 5e378717d2
commit 2f37b85426

View file

@ -1063,7 +1063,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
let result = matches
.value_of(OPT_TMP_DIR)
.map(String::from)
.unwrap_or_else(|| DEFAULT_TMPDIR.to_owned());
.unwrap_or(DEFAULT_TMPDIR.to_owned());
settings.tmp_dir = PathBuf::from(result);
} else {
for (key, value) in env::vars_os() {