-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add lint unnecessary_option_map_or_else #14662
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
Conversation
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 looks good in general, I just have a few subtle suggestions. Please use snippet_with_applicability
instead of plain snippet
. Otherwise, we end up breaking cargo fix
. In addition, I'd like to see some tests for other scenarios.
This comment has been minimized.
This comment has been minimized.
fc6bf4d
to
1c0dc21
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
1c0dc21
to
e410d6f
Compare
Yes, the review is done. r=me after a rebase. |
Rebase is done |
changelog: [
unnecessary_option_map_or_else
]: Added lint unnecessary_option_map_or_else. As suggested in the issue description, the implementation takes as reference the issue #7328. The tests for lintsoption_if_let_else
andor_fun_call
needed to be adjusted to comply with new lint.fixes #14588