2020-11-05 07:29:48 -06:00
|
|
|
error: comparison to empty slice
|
2023-07-31 16:53:53 -05:00
|
|
|
--> $DIR/comparison_to_empty.rs:10:13
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | let _ = s == "";
|
|
|
|
| ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::comparison-to-empty` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: comparison to empty slice
|
2023-07-31 16:53:53 -05:00
|
|
|
--> $DIR/comparison_to_empty.rs:11:13
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | let _ = s != "";
|
|
|
|
| ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()`
|
|
|
|
|
|
|
|
error: comparison to empty slice
|
2023-07-31 16:53:53 -05:00
|
|
|
--> $DIR/comparison_to_empty.rs:14:13
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | let _ = v == [];
|
|
|
|
| ^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`
|
|
|
|
|
|
|
|
error: comparison to empty slice
|
2023-07-31 16:53:53 -05:00
|
|
|
--> $DIR/comparison_to_empty.rs:15:13
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | let _ = v != [];
|
|
|
|
| ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!v.is_empty()`
|
|
|
|
|
2023-07-31 16:53:53 -05:00
|
|
|
error: comparison to empty slice using `if let`
|
|
|
|
--> $DIR/comparison_to_empty.rs:16:8
|
|
|
|
|
|
|
|
|
LL | if let [] = &*v {}
|
|
|
|
| ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(*v).is_empty()`
|
|
|
|
|
|
|
|
error: comparison to empty slice using `if let`
|
|
|
|
--> $DIR/comparison_to_empty.rs:18:8
|
|
|
|
|
|
|
|
|
LL | if let [] = s {}
|
|
|
|
| ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
|
|
|
|
|
|
|
|
error: comparison to empty slice using `if let`
|
|
|
|
--> $DIR/comparison_to_empty.rs:19:8
|
|
|
|
|
|
|
|
|
LL | if let [] = &*s {}
|
|
|
|
| ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
|
|
|
|
|
|
|
|
error: comparison to empty slice using `if let`
|
|
|
|
--> $DIR/comparison_to_empty.rs:20:8
|
|
|
|
|
|
|
|
|
LL | if let [] = &*s && s == [] {}
|
|
|
|
| ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
|
|
|
|
|
|
|
|
error: comparison to empty slice
|
|
|
|
--> $DIR/comparison_to_empty.rs:20:24
|
|
|
|
|
|
|
|
|
LL | if let [] = &*s && s == [] {}
|
|
|
|
| ^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.is_empty()`
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
2020-11-05 07:29:48 -06:00
|
|
|
|