mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +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(
|
pub fn program(
|
||||||
&self,
|
&self,
|
||||||
span: Span,
|
span: Span,
|
||||||
|
source_type: SourceType,
|
||||||
directives: Vec<'a, Directive>,
|
directives: Vec<'a, Directive>,
|
||||||
body: Vec<'a, Statement<'a>>,
|
body: Vec<'a, Statement<'a>>,
|
||||||
source_type: SourceType,
|
|
||||||
) -> Program<'a> {
|
) -> Program<'a> {
|
||||||
Program { span, directives, body, source_type }
|
Program { span, source_type, directives, body }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Literals ---------- */
|
/* ---------- Literals ---------- */
|
||||||
|
|
|
||||||
|
|
@ -171,9 +171,9 @@ impl<'a> Parser<'a> {
|
||||||
self.error(self.flow_error().unwrap_or(error));
|
self.error(self.flow_error().unwrap_or(error));
|
||||||
let program = self.ast.program(
|
let program = self.ast.program(
|
||||||
Span::default(),
|
Span::default(),
|
||||||
self.ast.new_vec(),
|
|
||||||
self.ast.new_vec(),
|
|
||||||
self.source_type,
|
self.source_type,
|
||||||
|
self.ast.new_vec(),
|
||||||
|
self.ast.new_vec(),
|
||||||
);
|
);
|
||||||
(program, true)
|
(program, true)
|
||||||
}
|
}
|
||||||
|
|
@ -192,7 +192,7 @@ impl<'a> Parser<'a> {
|
||||||
self.parse_directives_and_statements(/* is_top_level */ true)?;
|
self.parse_directives_and_statements(/* is_top_level */ true)?;
|
||||||
|
|
||||||
let span = Span::new(0, self.source_text.len() as u32);
|
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]
|
#[must_use]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue