mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
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
This commit is contained in:
parent
0a771169b8
commit
1ab38fcd3f
3 changed files with 5 additions and 3 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue