Skip to content

Commit 19bec64

Browse files
committed
fix(extractor): remove unreachable duplicate match arms in Rust match_js_node (#1399)
The PR moved class_static_block and field_definition earlier in the match block (lines 771/773) but left identical arms below (lines 786/787) as dead code. Removing them eliminates Rust unreachable_patterns warnings.
1 parent a7832ab commit 19bec64

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

crates/codegraph-core/src/extractors/javascript.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -780,11 +780,6 @@ fn match_js_node(node: &Node, source: &[u8], symbols: &mut FileSymbols, _depth:
780780
"import_statement" => handle_import_stmt(node, source, symbols),
781781
"export_statement" => handle_export_stmt(node, source, symbols),
782782
"expression_statement" => handle_expr_stmt(node, source, symbols),
783-
// Synthetic definitions for class field initializers and static blocks.
784-
// These give `findCaller` a narrower span with a kind that passes the SQL
785-
// call-edge filter (`kind IN ('function','method')`), matching WASM behaviour.
786-
"field_definition" | "public_field_definition" => handle_field_def(node, source, symbols),
787-
"class_static_block" => handle_static_block(node, source, symbols),
788783
_ => {}
789784
}
790785
}

0 commit comments

Comments
 (0)