Skip to content

Commit f1f9c36

Browse files
authored
cleanup: remove redundant for loop (#167)
1 parent 5720fd0 commit f1f9c36

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/analyzer/psi/utils.v

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ pub fn get_it_call(element PsiElement) ?&CallExpression {
1717
}
1818

1919
methods_names := ['filter', 'map', 'any', 'all']
20-
if mut parent_call is CallExpression {
21-
for !is_array_method_call(*parent_call, ...methods_names) {
22-
return none
23-
}
24-
}
25-
26-
if mut parent_call is CallExpression {
20+
if mut parent_call is CallExpression && is_array_method_call(parent_call, ...methods_names) {
2721
return parent_call
2822
}
2923

0 commit comments

Comments
 (0)