Skip to content

Categorize map_flatten as a style lint instead of pedantic #7999

@orhun

Description

@orhun

I recently learned that we can write and_then() for Option's instead of map().flatten(). There is a lint for that which is called map_flatten. Unfortunately, it is categorized as clippy::pedantic so I doubt I would ever hear about it if I didn't come to this repository to propose the exact same lint and see that it already exists. I think this should be suggested by clippy as default.

So I'm basically proposing to make map_flatten a style lint instead of pedantic so that clippy will warn about this lint as default. I'd like to provide a PR.

Additional context

@rustbot label C-enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-categoryArea: Categorization of lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions