From 21b0d0196b77021fb0187199231a8642b943bc8a Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Thu, 20 Jun 2024 01:33:09 +0000 Subject: [PATCH] refactor(transformer): pass ref to function (#3781) Tiny refactor. Pass `&TSEnumDeclaration` to function instead of `&Box` (which is a reference to a reference). --- crates/oxc_transformer/src/typescript/enum.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_transformer/src/typescript/enum.rs b/crates/oxc_transformer/src/typescript/enum.rs index da78eefa96883..894c59fae2820 100644 --- a/crates/oxc_transformer/src/typescript/enum.rs +++ b/crates/oxc_transformer/src/typescript/enum.rs @@ -1,4 +1,4 @@ -use oxc_allocator::{Box, Vec}; +use oxc_allocator::Vec; use oxc_ast::{ast::*, visit::walk_mut, VisitMut}; use oxc_span::{Atom, SPAN}; use oxc_syntax::{ @@ -55,7 +55,7 @@ impl<'a> TypeScriptEnum<'a> { /// ``` fn transform_ts_enum( &mut self, - decl: &Box<'a, TSEnumDeclaration<'a>>, + decl: &TSEnumDeclaration<'a>, is_export: bool, ctx: &TraverseCtx<'a>, ) -> Option> {