mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
clippy: Fix dereferencing a tuple pattern warnings (#31811)
This commit is contained in:
parent
b22281d94f
commit
694e86ecff
14 changed files with 29 additions and 37 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue