-
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
Add real suggestion to option_map_unwrap_or #4634
Conversation
I'm afraid even with the above suggestions, we will still have to wait for the rustup. |
Now that the rustup is through, we can continue. |
0027914
to
a790f57
Compare
Thanks for the feedback @llogiq - I applied your suggestions. I also added the macro context check, doing nothing in case they differ. Not sure if this is the correct behaviour (but it looks like this is how it's handled in other tests). |
Ok, the build is blocked on the rustfmt check. You can call |
a790f57
to
2f500a5
Compare
Thanks again. Should be good now 😀 |
Impl looks really good! As @llogiq suggested:
Since the tests for this lint are in the pile of tests in rust-clippy/tests/ui/methods.rs Lines 165 to 204 in 2f500a5
in a new test file named |
☔ The latest upstream changes (presumably #4657) made this pull request unmergeable. Please resolve the merge conflicts. |
@m-ober is there anything you need besides time to get this PR to a mergeable state? If we can somehow help, feel free to ask. |
2f500a5
to
43424c8
Compare
I tried to finish the PR according to @flip1995's instructions but it seems there is a problem:
The former suggestion was to use Looking at option_map_unwrap_or.fixed it seems that nothing at all is changed. Why is that? Did I forget something? |
No idea, perhaps the applicability is not set correctly? |
Oh multipart suggestions can't be applied currently. See rust-lang/rustfix#162, rust-lang/rust#53934 Just remove the |
43424c8
to
4bafdca
Compare
I have removed the "WIP" tag as I think the PR should be in good shape now. The failing pipeline should not be related to my changes. |
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 now. ping @llogiq
ping from triage @m-ober. It seems the only open comment is #4634 (comment). Do you need some help with that? |
@flip1995 Sorry, I hope I will find some time on the weekend to finally finish this pr 😃 |
☔ The latest upstream changes (presumably #4962) made this pull request unmergeable. Please resolve the merge conflicts. |
63b54ed
to
24a3c64
Compare
24a3c64
to
c5046fd
Compare
I have implemented the change suggested by @llogiq - I hope everything is fine now :) |
I'll look into that later today or tomorrow. Thank you! |
LGTM, but we're blocked on #4972. |
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.
Ok, this is ready to merge now.
@bors: r+ |
📌 Commit c5046fd has been approved by |
Add real suggestion to option_map_unwrap_or Fixes #2320
💔 Test failed - checks-travis |
Oops, added the "changelog:" line. |
No biggie! @bors retry |
Add real suggestion to option_map_unwrap_or changelog: Add real suggestion to `option_map_unwrap_or` Fixes #2320
☀️ Test successful - checks-travis, status-appveyor |
changelog: Add real suggestion to
option_map_unwrap_or
Fixes #2320