aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/buffer_source.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-02-28 14:53:04 +0100
committerGitHub <noreply@github.com>2024-02-28 13:53:04 +0000
commit98bd306816f8c3d3e7569032b9b6ace76892d963 (patch)
tree84f998bf043a81962bd642755ba0c51e82ec4c09 /components/script/dom/bindings/buffer_source.rs
parent2afd5431b17d35400b37bb4093acb2a3a128ee04 (diff)
downloadservo-98bd306816f8c3d3e7569032b9b6ace76892d963.tar.gz
servo-98bd306816f8c3d3e7569032b9b6ace76892d963.zip
mach: Do not use unstable rust for `rustfmt` (#31441)
We can use stable rust if we pass the unstable configuration as command-line arguments to rustfmt itself. This prevents needing to install an unstable rust toolchain. The one downside here is that it doesn't seem that "ignore" is supported so we have to start formatting the files in "third_party." This shouldn't be a huge issue because we don't plan to check much more rust code into those directories.
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();