-
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 some unnecessary_filter_map
false positives
#8479
Conversation
The tests currently fail, and are fixed by the next commit.
r? @llogiq (rust-highfive has picked a reviewer for you, use r? to override) |
Good improvement! Thank you! @bors r+ |
📌 Commit d123ffc has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
@smoelius Thanks huge for the fix! |
@BartMassey No problem at all. By chance, have you had a chance to try it? (It's helpful to know a fix works on "real code.") |
@smoelius Assuming the version of Clippy that has this PR has made it into nightly, I'm afraid it doesn't work for me. Do I need to build Clippy myself to try this? |
Hey @BartMassey, I believe that this change has not yet made it into nightly yet. The repos are usually synced every two weeks. It should be available in one or two days (depending on when this will be done this week). 🙃 |
Thanks for checking, @BartMassey. Thanks for responding, @xFrednet. :) |
Thanks for the update! I can build it myself if needed, but it sounds like it's easier to just wait a bit at this point. Will let you know. |
FYI @BartMassey, the fix has just been synced and should be available in the next nightly :) |
@xFrednet Thanks! I'll give it a try shortly. |
This is a proposed fix for #4433.
It moves
clone_or_copy_needed
out ofunnecessary_iter_cloned.rs
and intomethods::utils
. It then adds a check of this function tounnecessary_filter_map::check
.Fixes #4433
changelog: none