Skip to content

Improvement Idea: the ilter_next should also cover skip_while().next() #4036

@Lesstat

Description

@Lesstat

I recently realized that skip_while(|i| !condition(i)).next() does the same as filter(|i| condition(i)).next() and more importantly has the same intent.

I propose to also lint skip_while(...).next()with the filter_next lint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesL-complexityLint: Belongs in the complexity lint group

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions