From c6e06af84aee2b48771fd02b38b54b1224a367cf Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Tue, 4 Mar 2025 09:57:13 +0100 Subject: [PATCH] tests/common/util: Use is_none_or instead of map_or Following clippy advice: error: this `map_or` can be simplified --> tests\common\util.rs:411:9 | 411 | self.exit_status.map_or(true, |e| e.success()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_none_or instead: `self.exit_status.is_none_or(|e| e.success())` --- tests/common/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common/util.rs b/tests/common/util.rs index d6cfcab34..d6352b993 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -408,7 +408,7 @@ impl CmdResult { /// Returns whether the program succeeded pub fn succeeded(&self) -> bool { - self.exit_status.map_or(true, |e| e.success()) + self.exit_status.is_none_or(|e| e.success()) } /// asserts that the command resulted in a success (zero) status code