Skip to content

Commit 93d43be

Browse files
committed
perf(semantic): remove uneccessary allocation in builder
1 parent 8c9fc63 commit 93d43be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/oxc_semantic/src/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,7 @@ impl<'a> SemanticBuilder<'a> {
19121912
fn reference_identifier(&mut self, ident: &IdentifierReference) {
19131913
let flag = self.resolve_reference_usages();
19141914
let name = ident.name.to_compact_str();
1915-
let reference = Reference::new(ident.span, name.clone(), self.current_node_id, flag);
1915+
let reference = Reference::new(ident.span, name, self.current_node_id, flag);
19161916
// `function foo({bar: identifier_reference}) {}`
19171917
// ^^^^^^^^^^^^^^^^^^^^ Parameter initializer must be resolved immediately
19181918
// to avoid binding to variables inside the scope

0 commit comments

Comments
 (0)