mirror of
https://github.com/danbulant/oxc
synced 2026-05-23 06:08:47 +00:00
fix(oxc_ast,oxc_parser): fix clippy warnings
This commit is contained in:
parent
f382d36375
commit
08dfbc98b2
2 changed files with 5 additions and 5 deletions
|
|
@ -49,11 +49,11 @@ impl<'a> AstBuilder<'a> {
|
|||
pub fn program(
|
||||
&self,
|
||||
span: Span,
|
||||
source_type: SourceType,
|
||||
directives: Vec<'a, Directive>,
|
||||
body: Vec<'a, Statement<'a>>,
|
||||
source_type: SourceType,
|
||||
) -> Program<'a> {
|
||||
Program { span, directives, body, source_type }
|
||||
Program { span, source_type, directives, body }
|
||||
}
|
||||
|
||||
/* ---------- Literals ---------- */
|
||||
|
|
|
|||
|
|
@ -171,9 +171,9 @@ impl<'a> Parser<'a> {
|
|||
self.error(self.flow_error().unwrap_or(error));
|
||||
let program = self.ast.program(
|
||||
Span::default(),
|
||||
self.ast.new_vec(),
|
||||
self.ast.new_vec(),
|
||||
self.source_type,
|
||||
self.ast.new_vec(),
|
||||
self.ast.new_vec(),
|
||||
);
|
||||
(program, true)
|
||||
}
|
||||
|
|
@ -192,7 +192,7 @@ impl<'a> Parser<'a> {
|
|||
self.parse_directives_and_statements(/* is_top_level */ true)?;
|
||||
|
||||
let span = Span::new(0, self.source_text.len() as u32);
|
||||
Ok(self.ast.program(span, directives, statements, self.source_type))
|
||||
Ok(self.ast.program(span, self.source_type, directives, statements))
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
|
|
|
|||
Loading…
Reference in a new issue