-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lint suggesting to replace str::bytes().count()
with str::len()
#8083
Labels
Comments
giraffate
added
the
good-first-issue
These issues are a good way to get started with Clippy
label
Dec 8, 2021
Can I try this ? |
@rustbot claim |
@sivchari are you still working on this? |
I don't have no progress, so I unassign me. |
Since this issue has become unassigned, I am wondering if I could work on this issue? |
@rustbot claim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What it does
It checks for
str::bytes().count()
and suggests replacing it withstr::len()
that does the same but shorter and possibly more performant.Extra: can something like this be done for https://doc.rust-lang.org/std/io/trait.Read.html#method.bytes too?
Lint Name
bytes_count_to_len
Category
complexity
Advantage
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: