mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
df1ec91d95
formats code with fixes single match clippy error to replace with if let swaps ident.name.as_str to ident.name == sym for count fn
19 lines
535 B
Text
19 lines
535 B
Text
error: using long and hard to read `.bytes().count()`
|
|
--> $DIR/bytes_count_to_len.rs:7:5
|
|
|
|
|
LL | "hello".bytes().count();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::bytes-count-to-len` implied by `-D warnings`
|
|
= note: `.len()` achieves same functionality
|
|
|
|
error: using long and hard to read `.bytes().count()`
|
|
--> $DIR/bytes_count_to_len.rs:10:5
|
|
|
|
|
LL | s1.bytes().count();
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `.len()` achieves same functionality
|
|
|
|
error: aborting due to 2 previous errors
|
|
|