-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix all clippy warnings #6264
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 all clippy warnings #6264
Conversation
isum
left a 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.
Nice!
| .write(true) | ||
| .append(false) | ||
| .create(true) | ||
| .truncate(true) |
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.
This does not seem to be a lint fix. Why is this necessary?
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.
It was .. there is some lint that complains when this line isn't there
This applies all clippy lints that are marked as MachineApplicable, i.e., safe to apply without changing code semantics
Note that that also means that we run 'cargo clippy' in CI because the CI workflow runs 'just lint'
Actually a nice logic error
Note that that also means that we run 'cargo clippy' in CI because the CI workflow runs 'just lint'
This PR fixes all clippy warnings and requires that 'cargo clippy' passes in CI.
The commits with title "Run 'cargo clippy --fix'" were generated by running just that; since clippy only applies safe mechanical transforms with
--fix, they should not require much review. Most of the other commits are very small and address one specific lint.The first half of the PR (up to the first change to
justfile) only changes actual code since clippy is run against the default target (binary and library)The second half only changes test code by now running
cargo clippy --all-targets