Skip to content

Commit 7ada3c7

Browse files
[autofix.ci] apply automated fixes
1 parent 44a1edc commit 7ada3c7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

crates/biome_js_analyze/src/services/semantic_class.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -897,9 +897,8 @@ fn get_read_access_kind(node: &AnyCandidateForUsedInExpressionNode) -> AccessKin
897897
/// Not limited to `this` references. Can be used for any node, but requires more work e.g.
898898
/// Returns `true` if the read is access_kind, `false` otherwise.
899899
fn is_used_in_expression_context(node: &AnyCandidateForUsedInExpressionNode) -> bool {
900-
node.syntax()
901-
.ancestors()
902-
.any(|ancestor| matches!(
900+
node.syntax().ancestors().any(|ancestor| {
901+
matches!(
903902
ancestor.kind(),
904903
JsSyntaxKind::JS_RETURN_STATEMENT
905904
| JsSyntaxKind::JS_CALL_ARGUMENTS
@@ -918,7 +917,8 @@ fn is_used_in_expression_context(node: &AnyCandidateForUsedInExpressionNode) ->
918917
| JsSyntaxKind::JS_FOR_IN_STATEMENT
919918
| JsSyntaxKind::JS_FOR_OF_STATEMENT
920919
| JsSyntaxKind::JS_BINARY_EXPRESSION
921-
))
920+
)
921+
})
922922
}
923923

924924
#[cfg(test)]
@@ -1354,7 +1354,8 @@ mod tests {
13541354
case.description
13551355
);
13561356

1357-
for (node, (expected_name, expected_access_kind)) in nodes.iter().zip(&case.expected)
1357+
for (node, (expected_name, expected_access_kind)) in
1358+
nodes.iter().zip(&case.expected)
13581359
{
13591360
let meaningful_node =
13601361
AnyCandidateForUsedInExpressionNode::cast_ref(node.syntax())

0 commit comments

Comments
 (0)