-
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
Fix clippy never_loop #14413
Fix clippy never_loop #14413
Conversation
}; | ||
}, | ||
inner() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it rustfmt
does the same thing? We should probably keep the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of turning this into a closure we can just remove the loop
keyword and make use of the now stable label_break_value feature instead
It hits rust-lang/rustfmt#5676 but we can |
The problem was that clippy errors on this. Also it's kinda more readable, though if the closure is less performant or sth I understand |
Using |
@hecatia-elegua clippy is not considered a problem in this repository, but for maximizing readability I think you can make it a standalone function or method which is more readable than a labeled block and closure. |
just a small fix / refactor since clippy errored out
also passes cargo fmt now
edit: I just realized clippy has more complaints, but I'll just keep the PR this way and go on with my actual problem