rust-clippy/tests/ui/bytes_count_to_len.stderr
Chase Ruskin df1ec91d95 adds lint logic and test for bytes_count_to_len
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
2022-04-19 10:48:10 +09:00

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