File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
crates/biome_js_analyze/src/services Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -875,11 +875,12 @@ pub fn is_meaningful_read(node: &AnyMeaningfulReadNode) -> Option<bool> {
875875}
876876
877877fn is_used_in_expression_context ( node : & AnyMeaningfulReadNode ) -> Option < bool > {
878- let mut current: JsSyntaxNode = if let Some ( expression) = AnyJsExpression :: cast ( node. syntax ( ) . clone ( ) ) {
879- expression. syntax ( ) . clone ( ) // get JsSyntaxNode
880- } else {
881- node. syntax ( ) . clone ( ) // fallback to the node itself
882- } ;
878+ let mut current: JsSyntaxNode =
879+ if let Some ( expression) = AnyJsExpression :: cast ( node. syntax ( ) . clone ( ) ) {
880+ expression. syntax ( ) . clone ( ) // get JsSyntaxNode
881+ } else {
882+ node. syntax ( ) . clone ( ) // fallback to the node itself
883+ } ;
883884
884885 // Limit the number of parent traversals to avoid deep recursion
885886 for _ in 0 ..8 {
@@ -1313,7 +1314,8 @@ mod tests {
13131314 case. description
13141315 ) ;
13151316
1316- for ( node, ( expected_name, expected_meaningful) ) in nodes. iter ( ) . zip ( & case. expected ) {
1317+ for ( node, ( expected_name, expected_meaningful) ) in nodes. iter ( ) . zip ( & case. expected )
1318+ {
13171319 let meaningful_node = AnyMeaningfulReadNode :: cast_ref ( node. syntax ( ) )
13181320 . expect ( "Failed to cast node to AnyMeaningfulReadNode" ) ;
13191321
You can’t perform that action at this time.
0 commit comments