summaryrefslogtreecommitdiff
path: root/ext/webgpu/texture.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/webgpu/texture.rs')
-rw-r--r--ext/webgpu/texture.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/webgpu/texture.rs b/ext/webgpu/texture.rs
index 587ac46a7..4829811e2 100644
--- a/ext/webgpu/texture.rs
+++ b/ext/webgpu/texture.rs
@@ -1,7 +1,7 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+use deno_core::error::not_supported;
use deno_core::error::AnyError;
-use deno_core::error::{bad_resource_id, not_supported};
use deno_core::ResourceId;
use deno_core::{OpState, Resource};
use serde::Deserialize;
@@ -149,8 +149,7 @@ pub fn op_webgpu_create_texture(
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::TextureDescriptor {
@@ -204,8 +203,7 @@ pub fn op_webgpu_create_texture_view(
let instance = state.borrow::<super::Instance>();
let texture_resource = state
.resource_table
- .get::<WebGpuTexture>(args.texture_rid)
- .ok_or_else(bad_resource_id)?;
+ .get::<WebGpuTexture>(args.texture_rid)?;
let texture = texture_resource.0;
let descriptor = wgpu_core::resource::TextureViewDescriptor {