diff --git a/wgpu/src/backend/web.rs b/wgpu/src/backend/web.rs index 54ebeadb8a..15ed91356e 100644 --- a/wgpu/src/backend/web.rs +++ b/wgpu/src/backend/web.rs @@ -972,6 +972,12 @@ impl Context { } } +// The web doesn't provide any way to identify specific queue +// submissions. But Clippy gets concerned if we pass around `()` as if +// it were meaningful. +#[derive(Debug, Clone, Copy)] +pub struct SubmissionIndex; + impl crate::Context for Context { type AdapterId = Sendable; type DeviceId = Sendable; @@ -996,7 +1002,7 @@ impl crate::Context for Context { type SurfaceId = Sendable; type SurfaceOutputDetail = SurfaceOutputDetail; - type SubmissionIndex = (); + type SubmissionIndex = SubmissionIndex; type RequestAdapterFuture = MakeSendFuture< wasm_bindgen_futures::JsFuture, @@ -2280,7 +2286,7 @@ impl crate::Context for Context { queue.0.submit(&temp_command_buffers); - // SubmissionIndex is (), so just let this function end + SubmissionIndex } fn queue_get_timestamp_period(&self, _queue: &Self::QueueId) -> f32 {