Skip to content
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

Merged
merged 2 commits into from
Feb 28, 2022

Conversation

smoelius
Copy link
Contributor

This is a proposed fix for #4433.

It moves clone_or_copy_needed out of unnecessary_iter_cloned.rs and into methods::utils. It then adds a check of this function to unnecessary_filter_map::check.

Fixes #4433

changelog: none

@rust-highfive
Copy link

r? @llogiq

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 28, 2022
@llogiq
Copy link
Contributor

llogiq commented Feb 28, 2022

Good improvement! Thank you!

@bors r+

@bors
Copy link
Contributor

bors commented Feb 28, 2022

📌 Commit d123ffc has been approved by llogiq

@bors
Copy link
Contributor

bors commented Feb 28, 2022

⌛ Testing commit d123ffc with merge e511476...

@bors
Copy link
Contributor

bors commented Feb 28, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing e511476 to master...

@bors bors merged commit e511476 into rust-lang:master Feb 28, 2022
@smoelius smoelius deleted the unnecessary-filter-map branch February 28, 2022 20:31
@BartMassey
Copy link

@smoelius Thanks huge for the fix!

@smoelius
Copy link
Contributor Author

smoelius commented Mar 1, 2022

@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.")

@BartMassey
Copy link

@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?

@xFrednet
Copy link
Member

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). 🙃

@smoelius
Copy link
Contributor Author

Thanks for checking, @BartMassey. Thanks for responding, @xFrednet. :)

@BartMassey
Copy link

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.

@xFrednet
Copy link
Member

FYI @BartMassey, the fix has just been synced and should be available in the next nightly :)

@BartMassey
Copy link

@xFrednet Thanks! I'll give it a try shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive for unnecessary_filter_map
6 participants