From 3c1b2bf439b96b87a5e7342bd790521229a2c9ff Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:36:27 +0000 Subject: [PATCH] refactor(isolated_declarations): use `NONE` in AST builder calls (#7752) Pure refactor. `NONE` is shorter than `None::>`. --- crates/oxc_isolated_declarations/src/class.rs | 2 +- crates/oxc_isolated_declarations/src/module.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/oxc_isolated_declarations/src/class.rs b/crates/oxc_isolated_declarations/src/class.rs index 2f03e7a1f390b..49d40ca8a19f3 100644 --- a/crates/oxc_isolated_declarations/src/class.rs +++ b/crates/oxc_isolated_declarations/src/class.rs @@ -547,7 +547,7 @@ impl<'a> IsolatedDeclarations<'a> { &self, kind: BindingPatternKind<'a>, ) -> Box<'a, FormalParameters<'a>> { - let pattern = self.ast.binding_pattern(kind, None::>, false); + let pattern = self.ast.binding_pattern(kind, NONE, false); let parameter = self.ast.formal_parameter(SPAN, self.ast.vec(), pattern, None, false, false); let items = self.ast.vec1(parameter); diff --git a/crates/oxc_isolated_declarations/src/module.rs b/crates/oxc_isolated_declarations/src/module.rs index 8722d05f7ab0f..061aad0ebf512 100644 --- a/crates/oxc_isolated_declarations/src/module.rs +++ b/crates/oxc_isolated_declarations/src/module.rs @@ -1,7 +1,7 @@ use oxc_allocator::Box; use oxc_allocator::CloneIn; use oxc_allocator::Vec; -use oxc_ast::ast::*; +use oxc_ast::{ast::*, NONE}; use oxc_span::{Atom, GetSpan, SPAN}; use crate::{diagnostics::default_export_inferred, IsolatedDeclarations}; @@ -19,7 +19,7 @@ impl<'a> IsolatedDeclarations<'a> { self.ast.vec(), None, ImportOrExportKind::Value, - None::, + NONE, )) }