Skip to content

Commit

Permalink
perf(transformer): create Vec with capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Jun 10, 2024
1 parent 26b8a3c commit 0e5212c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_transformer/src/react/jsx_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl<'a> ReactJsxSource<'a> {
self.ctx.ast.object_property(SPAN, kind, key, value, None, false, false, false)
};

let mut properties = self.ctx.ast.new_vec();
let mut properties = self.ctx.ast.new_vec_with_capacity(3);
properties.push(ObjectPropertyKind::ObjectProperty(filename));
properties.push(ObjectPropertyKind::ObjectProperty(line_number));
properties.push(ObjectPropertyKind::ObjectProperty(column_number));
Expand Down

0 comments on commit 0e5212c

Please sign in to comment.