Skip to content

Categorize map_flatten as a style lint instead of pedantic #7999

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

Closed
orhun opened this issue Nov 19, 2021 · 0 comments · Fixed by #8054
Closed

Categorize map_flatten as a style lint instead of pedantic #7999

orhun opened this issue Nov 19, 2021 · 0 comments · Fixed by #8054
Labels
A-category Area: Categorization of lints

Comments

@orhun
Copy link

orhun commented Nov 19, 2021

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

@rustbot rustbot added the C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages label Nov 19, 2021
@camsteffen camsteffen added A-category Area: Categorization of lints and removed C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages labels Dec 1, 2021
@bors bors closed this as completed in 9eabec9 Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-category Area: Categorization of lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants