Skip to content

Commit

Permalink
refactor(isolated_declarations): use NONE in AST builder calls (#7752)
Browse files Browse the repository at this point in the history
Pure refactor. `NONE` is shorter than `None::<TSTypeAnnotation<'a>>`.
  • Loading branch information
overlookmotel committed Dec 9, 2024
1 parent 75ba4a9 commit 3c1b2bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/oxc_isolated_declarations/src/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ impl<'a> IsolatedDeclarations<'a> {
&self,
kind: BindingPatternKind<'a>,
) -> Box<'a, FormalParameters<'a>> {
let pattern = self.ast.binding_pattern(kind, None::<TSTypeAnnotation<'a>>, 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);
Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_isolated_declarations/src/module.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand All @@ -19,7 +19,7 @@ impl<'a> IsolatedDeclarations<'a> {
self.ast.vec(),
None,
ImportOrExportKind::Value,
None::<WithClause>,
NONE,
))
}

Expand Down

0 comments on commit 3c1b2bf

Please sign in to comment.