Add partialeq_to_none lint by lukaslueg · Pull Request #9288 · rust-lang/rust-cl...
source link: https://github.com/rust-lang/rust-clippy/pull/9288
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Add partialeq_to_none lint #9288
Conversation
Contributor
lukaslueg commented 16 days ago
Initial implementation of #9275, adding lint partialeq_to_none
. This is my first time working on clippy
, so please review carefully.
I'm unsure especially about the Sugg
, as it covers the entire BinOp
, instead of just covering one of the sides and the operator (see the multi-line example). I was unsure if pinpointing the suggestion wouldn't be brittle...
changelog: [PARTIALEQ_TO_NONE
]: Initial commit
Collaborator
rust-highfive commented 16 days ago
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Jarcho (or someone else) soon. Please see the contribution instructions for more information. |
Contributor
Jarcho commented 14 days ago
Implementation looks fine. Two things before merging:
|
Do we even need the |
Contributor
Author
lukaslueg commented 14 days ago
Also: |
Contributor
Jarcho commented 14 days ago
You do need to check for an option type as You can use |
Moving from Should I update the triggering code in the ui-tests, bless the results, or I don't feel strongly about the name, yet I think
which is correct. |
Contributor
Jarcho commented 12 days ago
Normally adding For the lint name, use whichever one you prefer. |
Contributor
Author
lukaslueg commented 12 days ago
I've had to make some changes to get the suggestions right (see the |
Contributor
Jarcho commented 11 days ago
Looks good. You can squash the changes. |
Contributor
Author
lukaslueg commented 11 days ago
Squashed |
Contributor
Jarcho commented 11 days ago
Thank you. @bors r+ |
Contributor
bors commented 11 days ago
Contributor
bors commented 11 days ago
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
No milestone
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK