Add serde and wgsl features to wgpu-core (#36411)

This fixes errors when running `./mach clippy -r -p layout_2020` and
`./mach clippy -r -p script`.

Also addressing an unused import warning when running the latter.

Testing: These changes do not require tests because it's just a compile
error fix.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-04-09 03:09:13 -07:00 committed by GitHub
parent a04b648421
commit 9c29acd6d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -34,9 +34,11 @@ use js::rust::{
CustomAutoRooterGuard, Handle, MutableHandleObject,
MutableHandleValue as SafeMutableHandleValue,
};
#[cfg(feature = "webgpu")]
use js::typedarray::{ArrayBuffer, HeapArrayBuffer};
use js::typedarray::{
ArrayBuffer, ArrayBufferU8, ArrayBufferView, ArrayBufferViewU8, CreateWith, HeapArrayBuffer,
TypedArray, TypedArrayElement, TypedArrayElementCreator,
ArrayBufferU8, ArrayBufferView, ArrayBufferViewU8, CreateWith, TypedArray, TypedArrayElement,
TypedArrayElementCreator,
};
use crate::dom::bindings::error::{Error, Fallible};

View file

@ -18,5 +18,5 @@ ipc-channel = { workspace = true }
malloc_size_of = { workspace = true }
serde = { workspace = true }
webrender_api = { workspace = true }
wgpu-core = { workspace = true }
wgpu-core = { workspace = true, features = ["serde", "wgsl"] }
wgpu-types = { workspace = true }