Skip to content

Commit cf7a758

Browse files
committed
nits
1 parent ebce347 commit cf7a758

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

nova_vm/src/ecmascript/builtins/indexed_collections/array_objects/array_prototype.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3511,9 +3511,7 @@ impl ArrayPrototype {
35113511
.bind(gc.nogc());
35123512
// 2. Let len be ? LengthOfArrayLike(array).
35133513
let array = array.scope(agent, gc.nogc());
3514-
let len = length_of_array_like(agent, array.get(agent), gc.reborrow())
3515-
.unbind()?
3516-
.bind(gc.nogc());
3514+
let len = length_of_array_like(agent, array.get(agent), gc.reborrow()).unbind()?;
35173515
// 3. Let separator be the implementation-defined list-separator String value appropriate for the host environment's current locale (such as ", ").
35183516
let separator = ", ";
35193517
// 4. Let R be the empty String.
@@ -3533,20 +3531,23 @@ impl ArrayPrototype {
35333531
PropertyKey::Integer(k.try_into().unwrap()),
35343532
gc.reborrow(),
35353533
)
3536-
.unbind()?;
3534+
.unbind()?
3535+
.bind(gc.nogc());
35373536
// c. If element is neither undefined nor null, then
35383537
if !element.is_undefined() && !element.is_null() {
35393538
// i. Let S be ? ToString(? Invoke(element, "toLocaleString")).
35403539
let argument = invoke(
35413540
agent,
3542-
element,
3541+
element.unbind(),
35433542
BUILTIN_STRING_MEMORY.toLocaleString.into(),
35443543
None,
35453544
gc.reborrow(),
35463545
)
35473546
.unbind()?
35483547
.bind(gc.nogc());
3549-
let s = to_string(agent, argument.unbind(), gc.reborrow()).unbind()?;
3548+
let s = to_string(agent, argument.unbind(), gc.reborrow())
3549+
.unbind()?
3550+
.bind(gc.nogc());
35503551
// ii. Set R to the string-concatenation of R and S.
35513552
r.push_str(s.as_str(agent));
35523553
};

0 commit comments

Comments
 (0)