From c872cfa5d1b0e5f729d26e30b6ffe55997706c1c Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Fri, 10 Jan 2025 07:28:37 +0100 Subject: [PATCH] cp: use is_some_and instead of map_or --- src/uu/cp/src/cp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index b87898c78..f3bded69e 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -935,7 +935,7 @@ impl Options { if backup_mode != BackupMode::NoBackup && matches .get_one::(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(),