mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
clippy: Fix option_as_ref_deref warnings (#31936)
This commit is contained in:
parent
c3b6d40f90
commit
a8976ff00a
7 changed files with 17 additions and 31 deletions
|
@ -88,8 +88,7 @@ impl CanvasRenderingContext2D {
|
|||
}
|
||||
|
||||
pub fn mark_as_dirty(&self) {
|
||||
self.canvas_state
|
||||
.mark_as_dirty(self.canvas.as_ref().map(|c| &**c))
|
||||
self.canvas_state.mark_as_dirty(self.canvas.as_deref())
|
||||
}
|
||||
|
||||
pub fn take_missing_image_urls(&self) -> Vec<ServoUrl> {
|
||||
|
@ -455,7 +454,7 @@ impl CanvasRenderingContext2DMethods for CanvasRenderingContext2D {
|
|||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-strokestyle
|
||||
fn SetStrokeStyle(&self, value: StringOrCanvasGradientOrCanvasPattern) {
|
||||
self.canvas_state
|
||||
.set_stroke_style(self.canvas.as_ref().map(|c| &**c), value)
|
||||
.set_stroke_style(self.canvas.as_deref(), value)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-strokestyle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue