This repository has been archived by the owner on Jul 21, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I recommend reviewing commits individually.
This PR fixes or silences all the outstanding clippy lints in the default configuration, and enable clippy to run as a GitHub action. This also includes a few other unrelated cleanups I spotted along the way.
One trade-off here is that I configured clippy to run as part of our existing "build" job (just like the
cargo fmt
check currently does). This is nice in that is re-uses the compilation cache that clippy generates (since it needs to actually do full type-checking with the compiler to work, it just doesn't do any codegen), but it also means that a clippy failure will abort the job before it attempts to do an actual compile. While clippy does report most error that the compiler itself does, it does miss a few things checked by the compiler in later stages. In this case the PR author would need to a edit-push-wait for CI cycle before the other errors will be surfaced by CI.To fix this we could either:
if:
conditions on every single later build step.)If anyone thinks it would be worth it, I can implement either of these options and update the PR.