mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
perf(codegen): remove useless to_owned (#8014)
This commit is contained in:
parent
7b703471b1
commit
862838fd28
1 changed files with 2 additions and 2 deletions
|
|
@ -2040,7 +2040,7 @@ impl Gen for AssignmentTargetProperty<'_> {
|
||||||
|
|
||||||
impl Gen for AssignmentTargetPropertyIdentifier<'_> {
|
impl Gen for AssignmentTargetPropertyIdentifier<'_> {
|
||||||
fn gen(&self, p: &mut Codegen, ctx: Context) {
|
fn gen(&self, p: &mut Codegen, ctx: Context) {
|
||||||
let ident_name = p.get_identifier_reference_name(&self.binding).to_owned();
|
let ident_name = p.get_identifier_reference_name(&self.binding);
|
||||||
if ident_name == self.binding.name.as_str() {
|
if ident_name == self.binding.name.as_str() {
|
||||||
self.binding.print(p, ctx);
|
self.binding.print(p, ctx);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -2048,7 +2048,7 @@ impl Gen for AssignmentTargetPropertyIdentifier<'_> {
|
||||||
p.print_str(self.binding.name.as_str());
|
p.print_str(self.binding.name.as_str());
|
||||||
p.print_colon();
|
p.print_colon();
|
||||||
p.print_soft_space();
|
p.print_soft_space();
|
||||||
p.print_str(&ident_name);
|
p.print_str(ident_name);
|
||||||
}
|
}
|
||||||
if let Some(expr) = &self.init {
|
if let Some(expr) = &self.init {
|
||||||
p.print_soft_space();
|
p.print_soft_space();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue