Skip to content

Comments

New lints iter_filter_is_some and iter_filter_is_ok#11990

Closed
ghost wants to merge 1 commit intomasterfrom
unknown repository
Closed

New lints iter_filter_is_some and iter_filter_is_ok#11990
ghost wants to merge 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost 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`]
@ghost ghost closed this by deleting the head repository Dec 23, 2023
This pull request was closed.
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