error: this boolean expression can be simplified
- --> $DIR/match_bool.rs:35:11
+ --> $DIR/match_bool.rs:38:11
|
-35 | match test && test {
+LL | match test && test {
| ^^^^^^^^^^^^ help: try: `test`
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
error: you seem to be trying to match on a boolean expression
- --> $DIR/match_bool.rs:14:5
+ --> $DIR/match_bool.rs:13:5
|
-14 | / match test {
-15 | | true => 0,
-16 | | false => 42,
-17 | | };
+LL | / match test {
+LL | | true => 0,
+LL | | false => 42,
+LL | | };
| |_____^ help: consider using an if/else expression: `if test { 0 } else { 42 }`
|
= note: `-D clippy::match-bool` implied by `-D warnings`
error: you seem to be trying to match on a boolean expression
- --> $DIR/match_bool.rs:20:5
+ --> $DIR/match_bool.rs:19:5
|
-20 | / match option == 1 {
-21 | | true => 1,
-22 | | false => 0,
-23 | | };
+LL | / match option == 1 {
+LL | | true => 1,
+LL | | false => 0,
+LL | | };
| |_____^ help: consider using an if/else expression: `if option == 1 { 1 } else { 0 }`
error: you seem to be trying to match on a boolean expression
- --> $DIR/match_bool.rs:25:5
+ --> $DIR/match_bool.rs:24:5
+ |
+LL | / match test {
+LL | | true => (),
+LL | | false => {
+LL | | println!("Noooo!");
+LL | | },
+LL | | };
+ | |_____^
+help: consider using an if/else expression
+ |
+LL | if !test {
+LL | println!("Noooo!");
+LL | };
|
-25 | / match test {
-26 | | true => (),
-27 | | false => { println!("Noooo!"); }
-28 | | };
- | |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
error: you seem to be trying to match on a boolean expression
- --> $DIR/match_bool.rs:30:5
+ --> $DIR/match_bool.rs:31:5
+ |
+LL | / match test {
+LL | | false => {
+LL | | println!("Noooo!");
+LL | | },
+LL | | _ => (),
+LL | | };
+ | |_____^
+help: consider using an if/else expression
+ |
+LL | if !test {
+LL | println!("Noooo!");
+LL | };
|
-30 | / match test {
-31 | | false => { println!("Noooo!"); }
-32 | | _ => (),
-33 | | };
- | |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
error: you seem to be trying to match on a boolean expression
- --> $DIR/match_bool.rs:35:5
+ --> $DIR/match_bool.rs:38:5
+ |
+LL | / match test && test {
+LL | | false => {
+LL | | println!("Noooo!");
+LL | | },
+LL | | _ => (),
+LL | | };
+ | |_____^
+help: consider using an if/else expression
+ |
+LL | if !(test && test) {
+LL | println!("Noooo!");
+LL | };
|
-35 | / match test && test {
-36 | | false => { println!("Noooo!"); }
-37 | | _ => (),
-38 | | };
- | |_____^ help: consider using an if/else expression: `if !(test && test) { println!("Noooo!"); }`
error: equal expressions as operands to `&&`
- --> $DIR/match_bool.rs:35:11
+ --> $DIR/match_bool.rs:38:11
|
-35 | match test && test {
+LL | match test && test {
| ^^^^^^^^^^^^
|
= note: #[deny(clippy::eq_op)] on by default
error: you seem to be trying to match on a boolean expression
- --> $DIR/match_bool.rs:40:5
+ --> $DIR/match_bool.rs:45:5
+ |
+LL | / match test {
+LL | | false => {
+LL | | println!("Noooo!");
+LL | | },
+... |
+LL | | },
+LL | | };
+ | |_____^
+help: consider using an if/else expression
+ |
+LL | if test {
+LL | println!("Yes!");
+LL | } else {
+LL | println!("Noooo!");
+LL | };
|
-40 | / match test {
-41 | | false => { println!("Noooo!"); }
-42 | | true => { println!("Yes!"); }
-43 | | };
- | |_____^ help: consider using an if/else expression: `if test { println!("Yes!"); } else { println!("Noooo!"); }`
error: aborting due to 8 previous errors