-
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
nonminimal_bool is very hard to read #5045
Comments
I don't see what is wrong: https://docs.google.com/spreadsheets/d/1pSdvDJbmO9bJYtSNNAcWKyDY5Q6tSho16geeHE-0LQ0/edit?usp=sharing |
Oh I misread the change: I thought it was |
Hm, indeed the suggestion is hard a bit to read but it depends on the complexity of the original code. What we should do here? |
A good start would be to keep the original order of the conditions: if it were |
That order also reads nicer to my eye, although it might just be because I'm familiar with the code. |
Yeah, I agree with not to change the ordering, at least this case. |
Heh, I found this comment btw: rust-clippy/clippy_lints/src/booleans.rs Lines 418 to 419 in 920cdb5
|
So, let's deal with the order problem only here, others should be tracked in #3141. |
b || a
is not the same as!a && b
.The text was updated successfully, but these errors were encountered: