From e5dd470ddb0b9e1296d29746ec7fb64ef939ca3f Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Sun, 23 Jun 2024 02:47:19 +0100 Subject: [PATCH] refactor(ast): reduce allocations in AST builder --- crates/oxc_ast/src/ast_builder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_ast/src/ast_builder.rs b/crates/oxc_ast/src/ast_builder.rs index 8702ab698e6c4..3a57013355178 100644 --- a/crates/oxc_ast/src/ast_builder.rs +++ b/crates/oxc_ast/src/ast_builder.rs @@ -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]