Skip to content

fix: filter_map_bool_then suggest wrongly when the closure cannot be decompose directly #14370

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

Merged
merged 2 commits into from
Mar 21, 2025

Conversation

profetia
Copy link
Contributor

@profetia profetia commented Mar 7, 2025

Closes #11617
Closes #14368

Clippy gives wrong suggestions when the filter and then cannot be put into closure directly. Since trying to transform these can be too complicated, Clippy will simply warn but don't try to fix.

changelog: [filter_map_bool_then]: fix wrong suggestions when the closure cannot be decompose directly

@rustbot
Copy link
Collaborator

rustbot commented Mar 7, 2025

r? @blyxyas

rustbot has assigned @blyxyas.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 7, 2025
@profetia profetia force-pushed the issue14368 branch 3 times, most recently from 1701177 to cd11752 Compare March 11, 2025 11:54
@profetia profetia changed the title fix: filter_map_bool_then suggest wrongly when contain return fix: filter_map_bool_then suggest wrongly when the closure cannot be decompose directly Mar 11, 2025
Copy link
Member

@blyxyas blyxyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some documentation, and this contribution seems ready!

Copy link
Member

@blyxyas blyxyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot for your contribution! I'm sure many people will benefit from this bugfix ❤️

@blyxyas blyxyas added this pull request to the merge queue Mar 21, 2025
Merged via the queue into rust-lang:master with commit 7a92626 Mar 21, 2025
11 checks passed
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
4 participants