diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-10 08:07:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-10 21:07:28 +0900 |
commit | 215528f4999ecfe931aa00b687095111cb0603d6 (patch) | |
tree | 362bf3a20640e3b2a437f5862427d141e9eaf713 /ext/webgpu/surface.rs | |
parent | a7a804919d8bde1a45c9a95b74d949401401a32f (diff) |
build: run clippy with --all-features (#18115)
Diffstat (limited to 'ext/webgpu/surface.rs')
-rw-r--r-- | ext/webgpu/surface.rs | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/ext/webgpu/surface.rs b/ext/webgpu/surface.rs index d20d06bb1..45ac44d03 100644 --- a/ext/webgpu/surface.rs +++ b/ext/webgpu/surface.rs @@ -13,25 +13,27 @@ use std::borrow::Cow; use wgpu_types::SurfaceStatus; pub fn init_surface(unstable: bool) -> Extension { - Extension::builder("deno_webgpu_surface") - .dependencies(vec!["deno_webidl", "deno_web", "deno_webgpu"]) - .esm(include_js_files!( - "03_surface.js", - "04_surface_idl_types.js", - )) - .ops(vec![ - op_webgpu_surface_configure::decl(), - op_webgpu_surface_get_current_texture::decl(), - op_webgpu_surface_present::decl(), - ]) - .state(move |state| { - // TODO: check & possibly streamline this - // Unstable might be able to be OpMiddleware - // let unstable_checker = state.borrow::<super::UnstableChecker>(); - // let unstable = unstable_checker.unstable; - state.put(super::Unstable(unstable)); - }) - .build() + Extension::builder_with_deps( + "deno_webgpu_surface", + &["deno_webidl", "deno_web", "deno_webgpu"], + ) + .esm(include_js_files!( + "03_surface.js", + "04_surface_idl_types.js", + )) + .ops(vec![ + op_webgpu_surface_configure::decl(), + op_webgpu_surface_get_current_texture::decl(), + op_webgpu_surface_present::decl(), + ]) + .state(move |state| { + // TODO: check & possibly streamline this + // Unstable might be able to be OpMiddleware + // let unstable_checker = state.borrow::<super::UnstableChecker>(); + // let unstable = unstable_checker.unstable; + state.put(super::Unstable(unstable)); + }) + .build() } pub struct WebGpuSurface(pub wgpu_core::id::SurfaceId); |