-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Lint suggesting to replace str::bytes().count()
with str::len()
#8083
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
Labels
Comments
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
Uh oh!
There was an error while loading. Please reload this page.
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: