mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
cp: use is_some_and instead of map_or
This commit is contained in:
parent
cef9a2b960
commit
c872cfa5d1
1 changed files with 1 additions and 1 deletions
|
@ -935,7 +935,7 @@ impl Options {
|
||||||
if backup_mode != BackupMode::NoBackup
|
if backup_mode != BackupMode::NoBackup
|
||||||
&& matches
|
&& matches
|
||||||
.get_one::<String>(update_control::arguments::OPT_UPDATE)
|
.get_one::<String>(update_control::arguments::OPT_UPDATE)
|
||||||
.map_or(false, |v| v == "none" || v == "none-fail")
|
.is_some_and(|v| v == "none" || v == "none-fail")
|
||||||
{
|
{
|
||||||
return Err(Error::InvalidArgument(
|
return Err(Error::InvalidArgument(
|
||||||
"--backup is mutually exclusive with -n or --update=none-fail".to_string(),
|
"--backup is mutually exclusive with -n or --update=none-fail".to_string(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue