mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 09:05:00 +00:00
29 lines
910 B
Plaintext
29 lines
910 B
Plaintext
error: comparison to empty slice
|
|
--> $DIR/comparison_to_empty.rs:8:13
|
|
|
|
|
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
|
|
--> $DIR/comparison_to_empty.rs:9:13
|
|
|
|
|
LL | let _ = s != "";
|
|
| ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()`
|
|
|
|
error: comparison to empty slice
|
|
--> $DIR/comparison_to_empty.rs:12:13
|
|
|
|
|
LL | let _ = v == [];
|
|
| ^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`
|
|
|
|
error: comparison to empty slice
|
|
--> $DIR/comparison_to_empty.rs:13:13
|
|
|
|
|
LL | let _ = v != [];
|
|
| ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!v.is_empty()`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|