clippy: Fix type_complexity warnings in components/script/dom (#33790)

* clippy: Fix type_complexity warnings in components/script/dom

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Use explicit & implicit method calls where needed

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Remove unwrap & pass pipeline_layout

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Remove unused variable - bgls

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

---------

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
tanishka 2024-10-11 20:27:41 +05:30 committed by GitHub
parent 2a6cfbaaf9
commit 8843a0e400
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 38 additions and 25 deletions

View file

@ -4,7 +4,6 @@
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use webgpu::wgc::id::{BindGroupLayoutId, PipelineLayoutId};
use webgpu::wgc::pipeline::RenderPipelineDescriptor;
use webgpu::{WebGPU, WebGPUBindGroupLayout, WebGPURenderPipeline, WebGPURequest, WebGPUResponse};
@ -16,7 +15,7 @@ use crate::dom::bindings::root::{Dom, DomRoot};
use crate::dom::bindings::str::USVString;
use crate::dom::globalscope::GlobalScope;
use crate::dom::gpubindgrouplayout::GPUBindGroupLayout;
use crate::dom::gpudevice::GPUDevice;
use crate::dom::gpudevice::{GPUDevice, PipelineLayout};
#[dom_struct]
pub struct GPURenderPipeline {
@ -70,7 +69,7 @@ impl GPURenderPipeline {
/// <https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderpipeline>
pub fn create(
device: &GPUDevice,
implicit_ids: Option<(PipelineLayoutId, Vec<BindGroupLayoutId>)>,
pipeline_layout: PipelineLayout,
descriptor: RenderPipelineDescriptor<'static>,
async_sender: Option<IpcSender<WebGPUResponse>>,
) -> Fallible<WebGPURenderPipeline> {
@ -83,7 +82,7 @@ impl GPURenderPipeline {
device_id: device.id().0,
render_pipeline_id,
descriptor,
implicit_ids,
implicit_ids: pipeline_layout.implicit(),
async_sender,
})
.expect("Failed to create WebGPU render pipeline");