mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
1223335547
commit
34eed29037
11 changed files with 196 additions and 214 deletions
|
@ -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(&());
|
||||
},
|
||||
_ => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue