2018-04-07 08:23:27 +00:00
|
|
|
error: this boolean expression can be simplified
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/match_bool.rs:38:11
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
2018-12-10 05:27:19 +00:00
|
|
|
38 | match test && test {
|
2018-04-07 08:23:27 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try: `test`
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::nonminimal-bool` implied by `-D warnings`
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/match_bool.rs:13:5
|
2018-10-06 16:18:06 +00:00
|
|
|
|
|
2018-12-10 05:27:19 +00:00
|
|
|
13 | / match test {
|
|
|
|
14 | | true => 0,
|
|
|
|
15 | | false => 42,
|
|
|
|
16 | | };
|
2018-10-06 16:18:06 +00:00
|
|
|
| |_____^ help: consider using an if/else expression: `if test { 0 } else { 42 }`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::match-bool` implied by `-D warnings`
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/match_bool.rs:19:5
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
2018-12-10 05:27:19 +00:00
|
|
|
19 | / match option == 1 {
|
|
|
|
20 | | true => 1,
|
|
|
|
21 | | false => 0,
|
|
|
|
22 | | };
|
2018-04-07 08:23:27 +00:00
|
|
|
| |_____^ 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
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/match_bool.rs:24:5
|
|
|
|
|
|
|
|
|
24 | / match test {
|
|
|
|
25 | | true => (),
|
|
|
|
26 | | false => {
|
|
|
|
27 | | println!("Noooo!");
|
|
|
|
28 | | },
|
|
|
|
29 | | };
|
|
|
|
| |_____^
|
|
|
|
help: consider using an if/else expression
|
|
|
|
|
|
|
|
|
24 | if !test {
|
|
|
|
25 | println!("Noooo!");
|
|
|
|
26 | };
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/match_bool.rs:31:5
|
|
|
|
|
|
|
|
|
31 | / match test {
|
|
|
|
32 | | false => {
|
|
|
|
33 | | println!("Noooo!");
|
|
|
|
34 | | },
|
|
|
|
35 | | _ => (),
|
|
|
|
36 | | };
|
|
|
|
| |_____^
|
|
|
|
help: consider using an if/else expression
|
|
|
|
|
|
|
|
|
31 | if !test {
|
|
|
|
32 | println!("Noooo!");
|
|
|
|
33 | };
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/match_bool.rs:38:5
|
|
|
|
|
|
|
|
|
38 | / match test && test {
|
|
|
|
39 | | false => {
|
|
|
|
40 | | println!("Noooo!");
|
|
|
|
41 | | },
|
|
|
|
42 | | _ => (),
|
|
|
|
43 | | };
|
|
|
|
| |_____^
|
|
|
|
help: consider using an if/else expression
|
|
|
|
|
|
|
|
|
38 | if !(test && test) {
|
|
|
|
39 | println!("Noooo!");
|
|
|
|
40 | };
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: equal expressions as operands to `&&`
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/match_bool.rs:38:11
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
2018-12-10 05:27:19 +00:00
|
|
|
38 | match test && test {
|
2018-04-07 08:23:27 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: #[deny(clippy::eq_op)] on by default
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
error: you seem to be trying to match on a boolean expression
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/match_bool.rs:45:5
|
|
|
|
|
|
|
|
|
45 | / match test {
|
|
|
|
46 | | false => {
|
|
|
|
47 | | println!("Noooo!");
|
|
|
|
48 | | },
|
|
|
|
... |
|
|
|
|
51 | | },
|
|
|
|
52 | | };
|
|
|
|
| |_____^
|
|
|
|
help: consider using an if/else expression
|
|
|
|
|
|
|
|
|
45 | if test {
|
|
|
|
46 | println!("Yes!");
|
|
|
|
47 | } else {
|
|
|
|
48 | println!("Noooo!");
|
|
|
|
49 | };
|
2018-04-07 08:23:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
|
|
|
|