Skip to content

Commit

Permalink
Apply review pt.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Jun 19, 2023
1 parent f5912de commit eddba26
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions boa_engine/src/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ impl Context<'_> {

let completion = loop {
let completion = self.run_next_instruction(|opcode, context| {
total_cost = total_cost
.checked_add(usize::from(opcode.cost()))
.unwrap_or(usize::MAX);
total_cost = total_cost.saturating_add(usize::from(opcode.cost()));
opcode.execute(context)
});
if let ControlFlow::Break(completion) = completion {
Expand Down

0 comments on commit eddba26

Please sign in to comment.