mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
17 lines
796 B
Text
17 lines
796 B
Text
error: this boolean expression can be simplified
|
|
--> tests/ui/nonminimal_bool_methods_unfixable.rs:6:9
|
|
|
|
|
LL | _ = !opt_opt.is_some_and(|x| !x.is_some_and(|y| y != 1000));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `opt_opt.is_none_or(|x| x.is_some_and(|y| y != 1000))`
|
|
|
|
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::nonminimal_bool)]`
|
|
|
|
error: this boolean expression can be simplified
|
|
--> tests/ui/nonminimal_bool_methods_unfixable.rs:6:34
|
|
|
|
|
LL | _ = !opt_opt.is_some_and(|x| !x.is_some_and(|y| y != 1000));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.is_none_or(|y| y == 1000)`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|