From ada7c01955723d2e5bcae49a6fbc4a5545514fbe Mon Sep 17 00:00:00 2001 From: Redfire Date: Sat, 2 Dec 2023 15:07:54 +0800 Subject: [PATCH] Reformatted Code --- mozjs/tests/typedarray.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mozjs/tests/typedarray.rs b/mozjs/tests/typedarray.rs index d4fb6c4dbc3..5cf94642728 100644 --- a/mozjs/tests/typedarray.rs +++ b/mozjs/tests/typedarray.rs @@ -89,7 +89,12 @@ fn typedarray() { assert_eq!(view.unwrap().is_shared(), false); rooted!(in(context) let mut rval = ptr::null_mut::()); - assert!(Float32Array::create(context, CreateWith::Slice(&[0.25, 0.5, 1.0, 2.0, 4.0]), rval.handle_mut()).is_ok()); + assert!(Float32Array::create( + context, + CreateWith::Slice(&[0.25, 0.5, 1.0, 2.0, 4.0]), + rval.handle_mut() + ) + .is_ok()); typedarray!(in(context) let array: Float32Array = rval.get()); assert_eq!(array.unwrap().as_slice(), &[0.25, 0.5, 1.0, 2.0, 4.0]); @@ -99,7 +104,12 @@ fn typedarray() { assert_eq!(array.unwrap().as_slice(), &[0.5, 1.0, 2.0, 2.0, 4.0]); rooted!(in(context) let mut rval = ptr::null_mut::()); - assert!(BigInt64Array::create(context, CreateWith::Slice(&[-6, -1, 0, 2, 5]), rval.handle_mut()).is_ok()); + assert!(BigInt64Array::create( + context, + CreateWith::Slice(&[-6, -1, 0, 2, 5]), + rval.handle_mut() + ) + .is_ok()); typedarray!(in(context) let array: BigInt64Array = rval.get()); assert_eq!(array.unwrap().as_slice(), &[-6, -1, 0, 2, 5]);