1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

cp: use is_some_and instead of map_or

This commit is contained in:
Daniel Hofstetter 2025-01-10 07:28:37 +01:00
parent cef9a2b960
commit c872cfa5d1

View file

@ -935,7 +935,7 @@ impl Options {
if backup_mode != BackupMode::NoBackup
&& matches
.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(
"--backup is mutually exclusive with -n or --update=none-fail".to_string(),