mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-09 23:24:12 +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
20 lines
535 B
Plaintext
20 lines
535 B
Plaintext
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
|
|
|