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>
This commit is contained in:
Samson 2024-07-17 22:37:52 +02:00 committed by GitHub
parent 1223335547
commit 34eed29037
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 196 additions and 214 deletions

View file

@ -206,13 +206,9 @@ impl GPUQueueMethods for GPUQueue {
}
impl AsyncWGPUListener for GPUQueue {
fn handle_response(
&self,
response: Option<Result<webgpu::WebGPUResponse, String>>,
promise: &Rc<Promise>,
) {
fn handle_response(&self, response: webgpu::WebGPUResponse, promise: &Rc<Promise>) {
match response {
Some(Ok(WebGPUResponse::SubmittedWorkDone)) => {
WebGPUResponse::SubmittedWorkDone => {
promise.resolve_native(&());
},
_ => {