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

New lint [filter_map_bool_then] #11115

Merged
merged 2 commits into from
Jul 26, 2023
Merged

Conversation

Centri3
Copy link
Member

@Centri3 Centri3 commented Jul 6, 2023

Closes #9098

changelog: New lint [filter_map_bool_then]

@rustbot
Copy link
Collaborator

rustbot commented Jul 6, 2023

r? @Jarcho

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 6, 2023
@Centri3 Centri3 force-pushed the filter_map_bool_then branch 3 times, most recently from efe36f1 to afdf612 Compare July 12, 2023 04:54
@Centri3 Centri3 force-pushed the filter_map_bool_then branch 2 times, most recently from 27c4d28 to 734c74d Compare July 14, 2023 00:37
@Jarcho
Copy link
Contributor

Jarcho commented Jul 16, 2023

Revisiting this, there is one notable issue. filter has a different signature for, taking Fn(&T), instead of Fn(T). Easiest way to handle this would be to limit the lint to Copy types and adjust the closure on filter to be |&<decl>|.

@Centri3 Centri3 force-pushed the filter_map_bool_then branch 2 times, most recently from be15c64 to 66bc412 Compare July 17, 2023 06:39
@bors
Copy link
Contributor

bors commented Jul 17, 2023

☔ The latest upstream changes (presumably #11116) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

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

Looks good. r=me after rebase.

@Jarcho
Copy link
Contributor

Jarcho commented Jul 26, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Jul 26, 2023

📌 Commit 3235d9d has been approved by Jarcho

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 26, 2023

⌛ Testing commit 3235d9d with merge 0fec99f...

@bors
Copy link
Contributor

bors commented Jul 26, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Jarcho
Pushing 0fec99f to master...

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.

Check for filter_map combined with bool::then, suggest filter then map
4 participants