diff --git a/crates/gosub_renderer/src/draw.rs b/crates/gosub_renderer/src/draw.rs index d8af8242d..b7a0f5552 100644 --- a/crates/gosub_renderer/src/draw.rs +++ b/crates/gosub_renderer/src/draw.rs @@ -100,7 +100,7 @@ where rect: bg, transform: None, radius: None, - brush: Brush::color(Color::BLACK), + brush: Brush::color(Color::WHITE), brush_transform: None, border: None, }; diff --git a/crates/gosub_styling/src/render_tree.rs b/crates/gosub_styling/src/render_tree.rs index f62589bbc..4529e3f31 100644 --- a/crates/gosub_styling/src/render_tree.rs +++ b/crates/gosub_styling/src/render_tree.rs @@ -846,11 +846,9 @@ impl gosub_render_backend::layout::CssProperty for CssProperty { } fn parse_color(&self) -> Option<(f32, f32, f32, f32)> { - if let Some(color) = self.actual.to_color() { - Some((color.r, color.g, color.b, color.a)) - } else { - None - } + self.actual + .to_color() + .map(|color| (color.r, color.g, color.b, color.a)) } fn as_number(&self) -> Option { @@ -932,9 +930,9 @@ impl gosub_render_backend::layout::CssValue for Value { } } -impl Into for CssValue { - fn into(self) -> Value { - Value(self) +impl From for Value { + fn from(val: CssValue) -> Self { + Value(val) } } diff --git a/crates/gosub_taffy/src/compute/inline.rs b/crates/gosub_taffy/src/compute/inline.rs index 86821d896..6de23f763 100644 --- a/crates/gosub_taffy/src/compute/inline.rs +++ b/crates/gosub_taffy/src/compute/inline.rs @@ -514,9 +514,9 @@ pub fn compute_inline_layout>( Some(0) => {} Some(i) => { - glyphs.get(i).map(|g| { + if let Some(g) = glyphs.get(i) { decoration.x_offset = g.x; - }); + } } } }