From 1c051ae9ae609be53cf533c6d178fce20b564ed0 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Sun, 8 Sep 2024 09:36:03 +0000 Subject: [PATCH] docs(traverse): correct code comment 2 (#5607) Numbering UIDs skips 1 i.e. `_foo`, `_foo2`, `_foo3`, etc. Correct comment to reflect this. --- crates/oxc_traverse/src/context/scoping.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_traverse/src/context/scoping.rs b/crates/oxc_traverse/src/context/scoping.rs index 1cdc705d82c29..ba6dac845b7dd 100644 --- a/crates/oxc_traverse/src/context/scoping.rs +++ b/crates/oxc_traverse/src/context/scoping.rs @@ -453,7 +453,7 @@ impl TraverseScoping { // `CompactStr`, rather than generating a new string on each attempt. // Postfixes greater than 99 should be very uncommon, so don't bother optimizing. - // Try single-digit postfixes (i.e. `_temp1`, `_temp2` ... `_temp9`) + // Try single-digit postfixes (i.e. `_temp2`, `_temp3` ... `_temp9`) name.push('2'); if self.name_is_unique(&name) { return name;