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

@ -152,7 +152,7 @@ use servo_config::{opts, pref};
use servo_rand::{random, Rng, ServoRng, SliceRandom};
use servo_url::{Host, ImmutableOrigin, ServoUrl};
use style_traits::CSSPixel;
use webgpu::{self, WebGPU, WebGPURequest};
use webgpu::{self, WebGPU, WebGPURequest, WebGPUResponse};
use webrender::{RenderApi, RenderApiSender};
use webrender_api::DocumentId;
use webrender_traits::{WebRenderNetApi, WebRenderScriptApi, WebrenderExternalImageRegistry};
@ -2069,7 +2069,7 @@ where
match request {
FromScriptMsg::RequestAdapter(response_sender, options, ids) => match webgpu_chan {
None => {
if let Err(e) = response_sender.send(None) {
if let Err(e) = response_sender.send(WebGPUResponse::None) {
warn!("Failed to send request adapter message: {}", e)
}
},