Skip to content

Commit

Permalink
docs(traverse): correct code comment 2 (#5607)
Browse files Browse the repository at this point in the history
Numbering UIDs skips 1 i.e. `_foo`, `_foo2`, `_foo3`, etc. Correct comment to reflect this.
  • Loading branch information
overlookmotel committed Sep 8, 2024
1 parent 2e24a15 commit 1c051ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_traverse/src/context/scoping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1c051ae

Please sign in to comment.