Skip to content

Commit

Permalink
refactor(ast): reduce allocations in AST builder
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Jun 23, 2024
1 parent ff1da27 commit e5dd470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_ast/src/ast_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ impl<'a> AstBuilder<'a> {

#[inline]
pub fn block_statement(self, block: Box<'a, BlockStatement<'a>>) -> Statement<'a> {
Statement::BlockStatement(self.block(block.span, block.unbox().body))
Statement::BlockStatement(block)
}

#[inline]
Expand Down

0 comments on commit e5dd470

Please sign in to comment.