-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-lintArea: New lintsArea: New lintsT-ASTType: Requires working with the ASTType: Requires working with the ASTgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
.filter().next() → .find()
.find().is_some() → .any()
These seem to catch people out rather frequently. It catches me out because it's what you do in Python. This also technically includes:
.position().is_some() → .any()
.rposition().is_some() → .any()
Perhaps also the similar Python idiom
left.zip(right).all(|(a, b)| a == b) → left.eq(right)
although that's contingent on length equality.
There's also the question of whether filter_map is better than flat_map when returning Option<T>. They're kind'a the same thing, but maybe one is better than the other. Maybe not though.
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsT-ASTType: Requires working with the ASTType: Requires working with the ASTgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy