11error: boolean to int conversion using if
2- --> $DIR/bool_to_int_with_if.rs:15 :5
2+ --> $DIR/bool_to_int_with_if.rs:16 :5
33 |
44LL | / if a {
55LL | | 1
@@ -12,7 +12,7 @@ LL | | };
1212 = note: `-D clippy::bool-to-int-with-if` implied by `-D warnings`
1313
1414error: boolean to int conversion using if
15- --> $DIR/bool_to_int_with_if.rs:20 :5
15+ --> $DIR/bool_to_int_with_if.rs:21 :5
1616 |
1717LL | / if a {
1818LL | | 0
@@ -24,7 +24,7 @@ LL | | };
2424 = note: `!a as i32` or `(!a).into()` can also be valid options
2525
2626error: boolean to int conversion using if
27- --> $DIR/bool_to_int_with_if.rs:25 :5
27+ --> $DIR/bool_to_int_with_if.rs:26 :5
2828 |
2929LL | / if !a {
3030LL | | 1
@@ -36,7 +36,7 @@ LL | | };
3636 = note: `!a as i32` or `(!a).into()` can also be valid options
3737
3838error: boolean to int conversion using if
39- --> $DIR/bool_to_int_with_if.rs:30 :5
39+ --> $DIR/bool_to_int_with_if.rs:31 :5
4040 |
4141LL | / if a || b {
4242LL | | 1
@@ -48,7 +48,7 @@ LL | | };
4848 = note: `(a || b) as i32` or `(a || b).into()` can also be valid options
4949
5050error: boolean to int conversion using if
51- --> $DIR/bool_to_int_with_if.rs:35 :5
51+ --> $DIR/bool_to_int_with_if.rs:36 :5
5252 |
5353LL | / if cond(a, b) {
5454LL | | 1
@@ -60,7 +60,7 @@ LL | | };
6060 = note: `cond(a, b) as i32` or `cond(a, b).into()` can also be valid options
6161
6262error: boolean to int conversion using if
63- --> $DIR/bool_to_int_with_if.rs:40 :5
63+ --> $DIR/bool_to_int_with_if.rs:41 :5
6464 |
6565LL | / if x + y < 4 {
6666LL | | 1
@@ -72,7 +72,7 @@ LL | | };
7272 = note: `(x + y < 4) as i32` or `(x + y < 4).into()` can also be valid options
7373
7474error: boolean to int conversion using if
75- --> $DIR/bool_to_int_with_if.rs:49 :12
75+ --> $DIR/bool_to_int_with_if.rs:50 :12
7676 |
7777LL | } else if b {
7878 | ____________^
@@ -85,7 +85,7 @@ LL | | };
8585 = note: `b as i32` or `b.into()` can also be valid options
8686
8787error: boolean to int conversion using if
88- --> $DIR/bool_to_int_with_if.rs:58 :12
88+ --> $DIR/bool_to_int_with_if.rs:59 :12
8989 |
9090LL | } else if b {
9191 | ____________^
@@ -98,7 +98,7 @@ LL | | };
9898 = note: `!b as i32` or `(!b).into()` can also be valid options
9999
100100error: boolean to int conversion using if
101- --> $DIR/bool_to_int_with_if.rs:118 :5
101+ --> $DIR/bool_to_int_with_if.rs:119 :5
102102 |
103103LL | if a { 1 } else { 0 }
104104 | ^^^^^^^^^^^^^^^^^^^^^ help: replace with from: `u8::from(a)`
0 commit comments