summaryrefslogtreecommitdiff
path: root/ext/webgpu/sampler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/webgpu/sampler.rs')
-rw-r--r--ext/webgpu/sampler.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/webgpu/sampler.rs b/ext/webgpu/sampler.rs
index 7921c4151..827ba4b3a 100644
--- a/ext/webgpu/sampler.rs
+++ b/ext/webgpu/sampler.rs
@@ -1,6 +1,5 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
-use deno_core::error::bad_resource_id;
use deno_core::error::AnyError;
use deno_core::ResourceId;
use deno_core::{OpState, Resource};
@@ -84,8 +83,7 @@ pub fn op_webgpu_create_sampler(
let instance = state.borrow::<super::Instance>();
let device_resource = state
.resource_table
- .get::<super::WebGpuDevice>(args.device_rid)
- .ok_or_else(bad_resource_id)?;
+ .get::<super::WebGpuDevice>(args.device_rid)?;
let device = device_resource.0;
let descriptor = wgpu_core::resource::SamplerDescriptor {