-
Notifications
You must be signed in to change notification settings - Fork 1.7k
explicit_counter_loop false positive with continue statement #1219
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
Comments
We could suggest to use |
Actually I think that you can simply suppress the suggestion if a continue |
I agree with @mbrt, I think this lint in most often wrong whenever the counter update statement can be unreachable because of a |
Yea let's just bail on |
Closes #1219 false positive for explicit_counter_loop
Clippy shows a false positive in this example, asking for an
explicit_counter_loop
refactor:But since the
continue
statement skips the counter, the proposedfor (count, ch) in text.char_indices()
is not equivalent.The text was updated successfully, but these errors were encountered: