clippy::complexity simplifications related to Iterators

This commit is contained in:
Matthias Krüger 2021-03-21 13:13:34 +01:00
parent bd407a9882
commit ae7e55c1dd
12 changed files with 64 additions and 80 deletions

View file

@ -71,7 +71,7 @@ fn test_has_block_expr_parent() {
}
pub(crate) fn has_bind_pat_parent(element: SyntaxElement) -> bool {
element.ancestors().find(|it| it.kind() == IDENT_PAT).is_some()
element.ancestors().any(|it| it.kind() == IDENT_PAT)
}
#[test]
fn test_has_bind_pat_parent() {