From fd2ecdd3600717ace0cf89f3a960e436f379b7dc Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Tue, 25 Jul 2023 11:19:56 -0400 Subject: [PATCH] refactor: gate `allow(clippy::drop_ref)` behind WASM build --- wgpu-hal/src/gles/adapter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-hal/src/gles/adapter.rs b/wgpu-hal/src/gles/adapter.rs index 5594dfa23..ca75bd09e 100644 --- a/wgpu-hal/src/gles/adapter.rs +++ b/wgpu-hal/src/gles/adapter.rs @@ -606,7 +606,7 @@ impl super::Adapter { // Drop the GL guard so we can move the context into AdapterShared // ( on Wasm the gl handle is just a ref so we tell clippy to allow // dropping the ref ) - #[allow(clippy::drop_ref)] + #[cfg_attr(target_arch = "wasm32", allow(clippy::drop_ref))] drop(gl); Some(crate::ExposedAdapter {