aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/buffer_source.rs
diff options
context:
space:
mode:
authorOluwatobi Sofela <60105594+oluwatobiss@users.noreply.github.com>2024-03-24 18:24:34 +0100
committerGitHub <noreply@github.com>2024-03-24 17:24:34 +0000
commit1ab38fcd3f01fa0dd35f5275f26158bdf8f4f329 (patch)
tree083d449423dfbdad191f359092dfa5f4f3b649ab /components/script/dom/bindings/buffer_source.rs
parent0a771169b82744ce2427c906c6162546285c6889 (diff)
downloadservo-1ab38fcd3f01fa0dd35f5275f26158bdf8f4f329.tar.gz
servo-1ab38fcd3f01fa0dd35f5275f26158bdf8f4f329.zip
clippy: Fix `default_constructed_unit_structs` warnings in `components` (#31827)
* clippy: Fix default constructed unit structs warnings * refactor: Allow default constructed unit structs to avoid gfx build error
Diffstat (limited to 'components/script/dom/bindings/buffer_source.rs')
-rw-r--r--components/script/dom/bindings/buffer_source.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/bindings/buffer_source.rs b/components/script/dom/bindings/buffer_source.rs
index dd78186aee9..0549ed9041d 100644
--- a/components/script/dom/bindings/buffer_source.rs
+++ b/components/script/dom/bindings/buffer_source.rs
@@ -77,7 +77,7 @@ where
let heap_buffer_source = match init {
HeapTypedArrayInit::Buffer(buffer_source) => HeapBufferSource {
buffer_source,
- phantom: PhantomData::default(),
+ phantom: PhantomData,
},
HeapTypedArrayInit::Info { len, cx } => {
rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>());
@@ -125,7 +125,7 @@ where
pub fn default() -> HeapBufferSource<T> {
HeapBufferSource {
buffer_source: BufferSource::Default(Box::new(Heap::default())),
- phantom: PhantomData::default(),
+ phantom: PhantomData,
}
}
@@ -436,7 +436,7 @@ where
HeapBufferSource {
buffer_source: BufferSource::ArrayBuffer(Heap::boxed(*array_buffer)),
- phantom: PhantomData::default(),
+ phantom: PhantomData,
}
}
}