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.
This PR applies several suggestions from clippy, the built-in Rust linter designed to "catch common mistakes and improve your Rust code". Running
cargo clippy
onmain
currently produces 66 warnings, after this PR there are 0. Most of these suggestions are about style, so please feel free to only accept some or none of this PR if they don't align with your coding style! I can remove any commits you don't want to merge, just let me know.Each lint is in its own commit. You can search up each of the lints on the clippy lints website to see why clippy suggests them.
This compiles and I did a basic profile download without any issues, but I didn't test more thoroughly than that.
If you want to enable clippy hints in your dev environment, in VS Code, you can go to settings and set
rust-analyzer.check.command
toclippy
, for helix you can follow these instructions, otherwise check the internet :)