]>
Commit | Line | Data |
---|---|---|
f20569fa | 1 | error: unnecessary boolean `not` operation |
3c0e092e | 2 | --> $DIR/if_not_else.rs:12:5 |
f20569fa XL |
3 | | |
4 | LL | / if !bla() { | |
5 | LL | | println!("Bugs"); | |
6 | LL | | } else { | |
7 | LL | | println!("Bunny"); | |
8 | LL | | } | |
9 | | |_____^ | |
10 | | | |
f20569fa | 11 | = help: remove the `!` and swap the blocks of the `if`/`else` |
2b03887a | 12 | = note: `-D clippy::if-not-else` implied by `-D warnings` |
f20569fa XL |
13 | |
14 | error: unnecessary `!=` operation | |
3c0e092e | 15 | --> $DIR/if_not_else.rs:17:5 |
f20569fa XL |
16 | | |
17 | LL | / if 4 != 5 { | |
18 | LL | | println!("Bugs"); | |
19 | LL | | } else { | |
20 | LL | | println!("Bunny"); | |
21 | LL | | } | |
22 | | |_____^ | |
23 | | | |
24 | = help: change to `==` and swap the blocks of the `if`/`else` | |
25 | ||
26 | error: aborting due to 2 previous errors | |
27 |