-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-styleLint: Belongs in the style lint groupLint: Belongs in the style lint groupgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
Enhancements for manual_flatten
-
for_each
Before:
iter.for_each(|o| { if let Some(x) = o { //.. } })
After
iter.flatten().for_each(|o| //..)
-
nested loops
Before:
for x in vec![vec![1]] { for y in x { //.. x is not used again } }
After:
for x in vec![vec![1]].into_iter().flatten() { // .. }
nahuakang
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-styleLint: Belongs in the style lint groupLint: Belongs in the style lint groupgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy