From 9bf6fee9e74ade73359a0010f74f71e0a21d2371 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Mon, 14 Oct 2024 20:52:32 +0100 Subject: [PATCH] refactor(transformer): `HelperLoader` common transform: re-order fields --- crates/oxc_transformer/src/common/helper_loader.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/oxc_transformer/src/common/helper_loader.rs b/crates/oxc_transformer/src/common/helper_loader.rs index 453e692ab25fac..7ef3ca3efc7a58 100644 --- a/crates/oxc_transformer/src/common/helper_loader.rs +++ b/crates/oxc_transformer/src/common/helper_loader.rs @@ -150,8 +150,8 @@ type LoadedHelper<'a> = FxHashMap, (Atom<'a>, BoundIdentifier<'a>)>; /// Stores the state of the helper loader in [`TransformCtx`]. pub struct HelperLoaderStore<'a> { - mode: HelperLoaderMode, module_name: Cow<'static, str>, + mode: HelperLoaderMode, /// Symbol ID for the `babelHelpers`. babel_helpers_symbol_id: Cell>, /// Loaded helpers, determined what helpers are loaded and what imports should be added. @@ -162,10 +162,10 @@ pub struct HelperLoaderStore<'a> { impl<'a> HelperLoaderStore<'a> { pub fn new(options: &HelperLoaderOptions) -> Self { Self { - mode: options.mode, module_name: options.module_name.clone(), - loaded_helpers: RefCell::new(FxHashMap::default()), + mode: options.mode, babel_helpers_symbol_id: Cell::new(None), + loaded_helpers: RefCell::new(FxHashMap::default()), } }