Skip to content

Commit 3adaf98

Browse files
committed
refactor(linter): simplify getting nodes count (#12239)
Small refactor. No need to use `Semantic::stats` here.
1 parent cd90549 commit 3adaf98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/oxc_linter/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl Linter {
142142
// don't thrash the cache too much. Feel free to tweak based on benchmarking.
143143
//
144144
// See https://github.com/oxc-project/oxc/pull/6600 for more context.
145-
if semantic.stats().nodes > 200_000 {
145+
if semantic.nodes().len() > 200_000 {
146146
// Collect rules into a Vec so that we can iterate over the rules multiple times
147147
let rules = rules.collect::<Vec<_>>();
148148

0 commit comments

Comments
 (0)