clippy: Fix dereferencing a tuple pattern warnings (#31811)

This commit is contained in:
Oluwatobi Sofela 2024-03-21 18:04:18 +01:00 committed by GitHub
parent b22281d94f
commit 694e86ecff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 29 additions and 37 deletions

View file

@ -138,18 +138,12 @@ impl LayoutHTMLCanvasElementHelpers for LayoutDom<'_, HTMLCanvasElement> {
fn data(self) -> HTMLCanvasData {
let source = unsafe {
match self.unsafe_get().context.borrow_for_layout().as_ref() {
Some(&CanvasContext::Context2d(ref context)) => {
Some(CanvasContext::Context2d(context)) => {
HTMLCanvasDataSource::Image(Some(context.to_layout().get_ipc_renderer()))
},
Some(&CanvasContext::WebGL(ref context)) => {
context.to_layout().canvas_data_source()
},
Some(&CanvasContext::WebGL2(ref context)) => {
context.to_layout().canvas_data_source()
},
Some(&CanvasContext::WebGPU(ref context)) => {
context.to_layout().canvas_data_source()
},
Some(CanvasContext::WebGL(context)) => context.to_layout().canvas_data_source(),
Some(CanvasContext::WebGL2(context)) => context.to_layout().canvas_data_source(),
Some(CanvasContext::WebGPU(context)) => context.to_layout().canvas_data_source(),
None => HTMLCanvasDataSource::Image(None),
}
};
@ -318,7 +312,7 @@ impl HTMLCanvasElement {
}
let data = match self.context.borrow().as_ref() {
Some(&CanvasContext::Context2d(ref context)) => {
Some(CanvasContext::Context2d(context)) => {
let (sender, receiver) =
ipc::channel(self.global().time_profiler_chan().clone()).unwrap();
let msg = CanvasMsg::FromScript(