Skip to content

Commit

Permalink
refactor(isolated_declarations): do not copy Vec unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Nov 17, 2024
1 parent 44fd962 commit 9b43c8c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crates/oxc_isolated_declarations/src/declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ impl<'a> IsolatedDeclarations<'a> {
decl: &VariableDeclaration<'a>,
declarations: oxc_allocator::Vec<'a, VariableDeclarator<'a>>,
) -> Box<'a, VariableDeclaration<'a>> {
self.ast.alloc_variable_declaration(
decl.span,
decl.kind,
self.ast.vec_from_iter(declarations),
self.is_declare(),
)
self.ast.alloc_variable_declaration(decl.span, decl.kind, declarations, self.is_declare())
}

pub(crate) fn transform_variable_declarator(
Expand Down

0 comments on commit 9b43c8c

Please sign in to comment.