From bd7b086ec1f9d428945f05fb12bda157f9e77dfd Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 31 Oct 2021 17:14:10 +0700 Subject: Reintroduce `Box` for `style_sheet` in `Radio` --- examples/styling/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/styling/src/main.rs') diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs index 3692ad1e..73f965d9 100644 --- a/examples/styling/src/main.rs +++ b/examples/styling/src/main.rs @@ -64,7 +64,7 @@ impl Sandbox for Styling { Some(self.theme), Message::ThemeChanged, ) - .style(self.theme.into()), + .style(self.theme), ) }, ); @@ -185,11 +185,11 @@ mod style { } } - impl From for &'static dyn radio::StyleSheet { + impl<'a> From for Box { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => &dark::Radio, + Theme::Dark => dark::Radio.into(), } } } -- cgit