Skip to content

Commit

Permalink
Some clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Razican committed Dec 24, 2021
1 parent 777a858 commit 18a2d91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions boa/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,7 @@ impl Context {
where
S: AsRef<[u8]>,
{
let src_bytes = src.as_ref();
Parser::new(src_bytes, self.strict).parse_all(&mut self.interner)
Parser::new(src.as_ref(), self.strict).parse_all(&mut self.interner)
}

/// <https://tc39.es/ecma262/#sec-call>
Expand Down Expand Up @@ -874,9 +873,8 @@ impl Context {
S: AsRef<[u8]>,
{
let main_timer = BoaProfiler::global().start_event("Main", "Main");
let src_bytes = src.as_ref();

let parsing_result = Parser::new(src_bytes, self.strict)
let parsing_result = Parser::new(src.as_ref(), self.strict)
.parse_all(&mut self.interner)
.map_err(|e| e.to_string());

Expand Down
2 changes: 1 addition & 1 deletion boa/src/syntax/parser/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl ParseError {
found,
span,
..
} => Self::expected(Vec::from(expected), found, span, new_context),
} => Self::expected(expected, found, span, new_context),
e => e,
}
}
Expand Down

0 comments on commit 18a2d91

Please sign in to comment.