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:
parent
5e378717d2
commit
2f37b85426
1 changed files with 1 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue