Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
neeldug committed Jun 21, 2021
2 parents aa8ae2d + 9c73c01 commit 11a346c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions boa/src/builtins/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,9 @@ impl Array {
let arg_count = args.len();

if length + arg_count > Number::MAX_SAFE_INTEGER as usize {
return context.throw_type_error("the length + the number of arguments exceed the maximum safe integer limit");
return context.throw_type_error(
"the length + the number of arguments exceed the maximum safe integer limit",
);
}

let new_array = Self::add_to_array_object(this, args, context)?;
Expand Down Expand Up @@ -735,7 +737,9 @@ impl Array {

if arg_c > 0 {
if len + arg_c > Number::MAX_SAFE_INTEGER as usize {
return context.throw_type_error("the length + the number of arguments exceed the maximum safe integer limit");
return context.throw_type_error(
"the length + the number of arguments exceed the maximum safe integer limit",
);
}
for k in (1..=len).rev() {
let from = k.wrapping_sub(1);
Expand Down

0 comments on commit 11a346c

Please sign in to comment.