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 lints iter_filter_is_some and iter_filter_is_ok #11990

Closed
wants to merge 1 commit into from
Closed

New lints iter_filter_is_some and iter_filter_is_ok #11990

wants to merge 1 commit into from

Conversation

m-rph
Copy link
Contributor

@m-rph m-rph commented Dec 20, 2023

Adds a pair of lints that check for cases of an iterator over Result and Option followed by filter without being followed by map as that is covered already by a different, specialized lint.

changelog: New Lint: [iter_filter_is_some]
changelog: New Lint: [iter_filter_is_ok]

Fixes #11843

PS, I also made some minor documentations fixes in a case where a double tick (`) was included.

@rustbot
Copy link
Collaborator

rustbot commented Dec 20, 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 Dec 20, 2023
Adds a pair of lints that check for cases of an iterator over `Result`
and `Option` followed by `filter` without being followed by `map` as
that is covered already by a different, specialized lint.

changelog: New Lint: [`iter_filter_is_some`]
changelog: New Lint: [`iter_filter_is_ok`]
@m-rph m-rph closed this by deleting the head repository Dec 23, 2023
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.

Suggest flatten over filter(Option::is_some)
3 participants