mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
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())`
This commit is contained in:
parent
a43fd11266
commit
c6e06af84a
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue