11error: length comparison to zero
2- --> tests/ui/len_zero.rs:82 :8
2+ --> tests/ui/len_zero.rs:88 :8
33 |
44LL | if x.len() == 0 {
55 | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.is_empty()`
@@ -8,13 +8,13 @@ LL | if x.len() == 0 {
88 = help: to override `-D warnings` add `#[allow(clippy::len_zero)]`
99
1010error: length comparison to zero
11- --> tests/ui/len_zero.rs:86 :8
11+ --> tests/ui/len_zero.rs:92 :8
1212 |
1313LL | if "".len() == 0 {}
1414 | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `"".is_empty()`
1515
1616error: comparison to empty slice
17- --> tests/ui/len_zero.rs:95 :20
17+ --> tests/ui/len_zero.rs:101 :20
1818 |
1919LL | println!("{}", *s1 == "");
2020 | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s1.is_empty()`
@@ -23,121 +23,121 @@ LL | println!("{}", *s1 == "");
2323 = help: to override `-D warnings` add `#[allow(clippy::comparison_to_empty)]`
2424
2525error: comparison to empty slice
26- --> tests/ui/len_zero.rs:96 :20
26+ --> tests/ui/len_zero.rs:102 :20
2727 |
2828LL | println!("{}", **s2 == "");
2929 | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s2.is_empty()`
3030
3131error: comparison to empty slice
32- --> tests/ui/len_zero.rs:97 :20
32+ --> tests/ui/len_zero.rs:103 :20
3333 |
3434LL | println!("{}", ***s3 == "");
3535 | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s3.is_empty()`
3636
3737error: comparison to empty slice
38- --> tests/ui/len_zero.rs:98 :20
38+ --> tests/ui/len_zero.rs:104 :20
3939 |
4040LL | println!("{}", ****s4 == "");
4141 | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s4.is_empty()`
4242
4343error: comparison to empty slice
44- --> tests/ui/len_zero.rs:99 :20
44+ --> tests/ui/len_zero.rs:105 :20
4545 |
4646LL | println!("{}", *****s5 == "");
4747 | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s5.is_empty()`
4848
4949error: comparison to empty slice
50- --> tests/ui/len_zero.rs:100 :20
50+ --> tests/ui/len_zero.rs:106 :20
5151 |
5252LL | println!("{}", ******(s6) == "");
5353 | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(s6).is_empty()`
5454
5555error: comparison to empty slice
56- --> tests/ui/len_zero.rs:103 :20
56+ --> tests/ui/len_zero.rs:109 :20
5757 |
5858LL | println!("{}", &**d2s == "");
5959 | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(**d2s).is_empty()`
6060
6161error: length comparison to zero
62- --> tests/ui/len_zero.rs:118 :8
62+ --> tests/ui/len_zero.rs:124 :8
6363 |
6464LL | if has_is_empty.len() == 0 {
6565 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
6666
6767error: length comparison to zero
68- --> tests/ui/len_zero.rs:121 :8
68+ --> tests/ui/len_zero.rs:127 :8
6969 |
7070LL | if has_is_empty.len() != 0 {
7171 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
7272
7373error: length comparison to zero
74- --> tests/ui/len_zero.rs:124 :8
74+ --> tests/ui/len_zero.rs:130 :8
7575 |
7676LL | if has_is_empty.len() > 0 {
7777 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
7878
7979error: length comparison to one
80- --> tests/ui/len_zero.rs:127 :8
80+ --> tests/ui/len_zero.rs:133 :8
8181 |
8282LL | if has_is_empty.len() < 1 {
8383 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
8484
8585error: length comparison to one
86- --> tests/ui/len_zero.rs:130 :8
86+ --> tests/ui/len_zero.rs:136 :8
8787 |
8888LL | if has_is_empty.len() >= 1 {
8989 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
9090
9191error: length comparison to zero
92- --> tests/ui/len_zero.rs:141 :8
92+ --> tests/ui/len_zero.rs:147 :8
9393 |
9494LL | if 0 == has_is_empty.len() {
9595 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
9696
9797error: length comparison to zero
98- --> tests/ui/len_zero.rs:144 :8
98+ --> tests/ui/len_zero.rs:150 :8
9999 |
100100LL | if 0 != has_is_empty.len() {
101101 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
102102
103103error: length comparison to zero
104- --> tests/ui/len_zero.rs:147 :8
104+ --> tests/ui/len_zero.rs:153 :8
105105 |
106106LL | if 0 < has_is_empty.len() {
107107 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
108108
109109error: length comparison to one
110- --> tests/ui/len_zero.rs:150 :8
110+ --> tests/ui/len_zero.rs:156 :8
111111 |
112112LL | if 1 <= has_is_empty.len() {
113113 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
114114
115115error: length comparison to one
116- --> tests/ui/len_zero.rs:153 :8
116+ --> tests/ui/len_zero.rs:159 :8
117117 |
118118LL | if 1 > has_is_empty.len() {
119119 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
120120
121121error: length comparison to zero
122- --> tests/ui/len_zero.rs:167 :8
122+ --> tests/ui/len_zero.rs:173 :8
123123 |
124124LL | if with_is_empty.len() == 0 {
125125 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `with_is_empty.is_empty()`
126126
127127error: length comparison to zero
128- --> tests/ui/len_zero.rs:179 :6
128+ --> tests/ui/len_zero.rs:185 :6
129129 |
130130LL | (has_is_empty.len() > 0).then(|| println!("This can happen."));
131131 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()`
132132
133133error: length comparison to zero
134- --> tests/ui/len_zero.rs:180 :6
134+ --> tests/ui/len_zero.rs:186 :6
135135 |
136136LL | (has_is_empty.len() == 0).then(|| println!("Or this!"));
137137 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()`
138138
139139error: length comparison to zero
140- --> tests/ui/len_zero.rs:184 :8
140+ --> tests/ui/len_zero.rs:190 :8
141141 |
142142LL | if b.len() != 0 {}
143143 | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!b.is_empty()`
0 commit comments