-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: option_if_let_else
FP when value partially moved
#14209
Conversation
r? clippy |
r? clippy |
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 PR has changed my mind in introducing new visitors, althought it still has to be done very carefully to avoid needless work / bugs, this use is very elegant.
Some documentation would be greatly appreciated, I left you some suggestions.
Thanks for the contribution! ❤️
I've just checked lintcheck, and it seems that this is removing a lot of real positives :/ |
6d6363f
to
c7d776b
Compare
Should be better now. |
r? @blyxyas |
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.
LGTM, thanks! ❤️
fixes #13964
The lint
option_map_unwrap_or
used to have a similar issue in #10579, so I borrowed its solution to fix this one.changelog: [
option_if_let_else
]: fix FP when value partially moved