aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpushadermodule.rs
diff options
context:
space:
mode:
authorSamson <16504129+sagudev@users.noreply.github.com>2024-07-17 22:37:52 +0200
committerGitHub <noreply@github.com>2024-07-17 20:37:52 +0000
commit34eed29037ba7c7ab68cd6ddbf27aa0fe81d6a47 (patch)
tree7084d8874d890943ae35e5721f6db4606b5f2e10 /components/script/dom/gpushadermodule.rs
parent122333554768d69789a08df25c0bcde3ddd1aa4c (diff)
downloadservo-34eed29037ba7c7ab68cd6ddbf27aa0fe81d6a47.tar.gz
servo-34eed29037ba7c7ab68cd6ddbf27aa0fe81d6a47.zip
Less nesting in webgpu response (#32799)
* Remove Option wrap of WebGPUResponse Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Replace WebGPUResponseResult with WebGPUResponse Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Diffstat (limited to 'components/script/dom/gpushadermodule.rs')
-rw-r--r--components/script/dom/gpushadermodule.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/gpushadermodule.rs b/components/script/dom/gpushadermodule.rs
index ceeb55d0025..f7af6360673 100644
--- a/components/script/dom/gpushadermodule.rs
+++ b/components/script/dom/gpushadermodule.rs
@@ -5,7 +5,7 @@
use std::rc::Rc;
use dom_struct::dom_struct;
-use webgpu::{WebGPU, WebGPURequest, WebGPUResponse, WebGPUResponseResult, WebGPUShaderModule};
+use webgpu::{WebGPU, WebGPURequest, WebGPUResponse, WebGPUShaderModule};
use super::gpu::AsyncWGPUListener;
use super::gpucompilationinfo::GPUCompilationInfo;
@@ -89,9 +89,9 @@ impl GPUShaderModuleMethods for GPUShaderModule {
}
impl AsyncWGPUListener for GPUShaderModule {
- fn handle_response(&self, response: Option<WebGPUResponseResult>, promise: &Rc<Promise>) {
+ fn handle_response(&self, response: WebGPUResponse, promise: &Rc<Promise>) {
match response {
- Some(Ok(WebGPUResponse::CompilationInfo(info))) => {
+ WebGPUResponse::CompilationInfo(info) => {
let info = GPUCompilationInfo::from(&self.global(), info);
promise.resolve_native(&info);
},