aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/buffer_source.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/buffer_source.rs')
-rw-r--r--components/script/dom/bindings/buffer_source.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/components/script/dom/bindings/buffer_source.rs b/components/script/dom/bindings/buffer_source.rs
index 031ecf9c185..80fa00e408b 100644
--- a/components/script/dom/bindings/buffer_source.rs
+++ b/components/script/dom/bindings/buffer_source.rs
@@ -269,8 +269,10 @@ where
buffer.get()
},
});
- let Ok(array) = array as Result<CustomAutoRooterGuard<'_, TypedArray<T, *mut JSObject>>, &mut ()> else{
- return Err(())
+ let Ok(array) =
+ array as Result<CustomAutoRooterGuard<'_, TypedArray<T, *mut JSObject>>, &mut ()>
+ else {
+ return Err(());
};
unsafe {
let slice = (*array).as_slice();
@@ -305,9 +307,10 @@ where
buffer.get()
},
});
- let Ok(mut array) = array as Result<CustomAutoRooterGuard<'_, TypedArray<T, *mut JSObject>>, &mut ()> else
- {
- return Err(())
+ let Ok(mut array) =
+ array as Result<CustomAutoRooterGuard<'_, TypedArray<T, *mut JSObject>>, &mut ()>
+ else {
+ return Err(());
};
unsafe {
let slice = (*array).as_mut_slice();