mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 13:07: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
|
let result = matches
|
||||||
.value_of(OPT_TMP_DIR)
|
.value_of(OPT_TMP_DIR)
|
||||||
.map(String::from)
|
.map(String::from)
|
||||||
.unwrap_or_else(|| DEFAULT_TMPDIR.to_owned());
|
.unwrap_or(DEFAULT_TMPDIR.to_owned());
|
||||||
settings.tmp_dir = PathBuf::from(result);
|
settings.tmp_dir = PathBuf::from(result);
|
||||||
} else {
|
} else {
|
||||||
for (key, value) in env::vars_os() {
|
for (key, value) in env::vars_os() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue