🔧 Fix linting warnings and errors (#6431)

This commit is contained in:
Elena Torró 2025-05-08 11:07:36 +02:00 committed by GitHub
parent 36e1ad287c
commit bd514c0594
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 13 deletions

View file

@ -1,5 +1,5 @@
use skia_safe::gpu::{self, gl::FramebufferInfo, gl::TextureInfo, DirectContext}; use skia_safe::gpu::{self, gl::FramebufferInfo, gl::TextureInfo, DirectContext};
use skia_safe::{self as skia, ISize, Surface, SurfaceProps, SurfacePropsFlags}; use skia_safe::{self as skia, ISize};
pub struct GpuState { pub struct GpuState {
pub context: DirectContext, pub context: DirectContext,

View file

@ -827,10 +827,9 @@ impl Shape {
paint.set_blend_mode(skia::BlendMode::SrcATop); paint.set_blend_mode(skia::BlendMode::SrcATop);
paint.set_anti_alias(true); paint.set_anti_alias(true);
paint.set_stroke_width(stroke.width * 2.0); paint.set_stroke_width(stroke.width * 2.0);
paint.set_color(match &stroke.fill { if let Fill::Solid(SolidColor(color)) = stroke.fill {
Fill::Solid(color) => *color, paint.set_color(color);
_ => Color::BLACK, }
});
paints.push(paint); paints.push(paint);
} }
StrokeKind::CenterStroke => { StrokeKind::CenterStroke => {
@ -838,10 +837,9 @@ impl Shape {
paint.set_style(skia::PaintStyle::Stroke); paint.set_style(skia::PaintStyle::Stroke);
paint.set_anti_alias(true); paint.set_anti_alias(true);
paint.set_stroke_width(stroke.width); paint.set_stroke_width(stroke.width);
paint.set_color(match &stroke.fill { if let Fill::Solid(SolidColor(color)) = stroke.fill {
Fill::Solid(color) => *color, paint.set_color(color);
_ => Color::BLACK, }
});
paints.push(paint); paints.push(paint);
} }
StrokeKind::OuterStroke => { StrokeKind::OuterStroke => {
@ -850,10 +848,9 @@ impl Shape {
paint.set_blend_mode(skia::BlendMode::DstOver); paint.set_blend_mode(skia::BlendMode::DstOver);
paint.set_anti_alias(true); paint.set_anti_alias(true);
paint.set_stroke_width(stroke.width * 2.0); paint.set_stroke_width(stroke.width * 2.0);
paint.set_color(match &stroke.fill { if let Fill::Solid(SolidColor(color)) = stroke.fill {
Fill::Solid(color) => *color, paint.set_color(color);
_ => Color::BLACK, }
});
paints.push(paint); paints.push(paint);
let mut paint = skia::Paint::default(); let mut paint = skia::Paint::default();