-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add clippy suggestions #6203
Add clippy suggestions #6203
Conversation
Subscribe to Label Action
This issue or pull request has been labeled: "cranelift", "cranelift:meta", "isle"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
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.
In general we don't use Clippy because there's a general consensus that it's too opinionated. That said, I like most of these changes!
There are a few that I would like for you to remove from this PR, and ideally arrange that Clippy will ignore them in the future. (I assume you can add something to the top-level clippy.toml
but I haven't looked into Clippy's configuration.)
With these changes, I'd be happy to merge this. Thanks!
Co-authored-by: Jamey Sharp <[email protected]>
Thanks for the review! It seems that we can't use Clippy.toml to enable lints globally. There was a workaround done by Embark, which is to put it in the .config/Cargo.toml file -- I can open another issue for this, as it would require removing the lints from each lib.rs file and putting them in .config/Cargo.toml |
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.
Yeah, let's not bother with trying to configure Clippy then. We really don't want to spend much time on Clippy lints.
That said, I'll go ahead and take these changes. I do think they are improvements.
I'm sure there are more improvements we could find by digging through Clippy's suggestions, but that isn't something we want to spend review time on.
We have a bunch of open issues that we'd love your help with. Take a look at
cranelift:E-easy
Made a few clippy fixes in this PR. I did not do all of the clippy fixes as it may be that only certain things should be changed and or clippy fixes are not deemed necessary.
This PR is more of a temperature check :)