From fcc282bd76c88f389d510411b0ae73e1a4eaf317 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 31 Oct 2021 16:58:02 +0700 Subject: Reintroduce `Box` for `style_sheet` in `Checkbox` --- examples/styling/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/styling/src') diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs index 9e31c383..e8829b53 100644 --- a/examples/styling/src/main.rs +++ b/examples/styling/src/main.rs @@ -108,7 +108,7 @@ impl Sandbox for Styling { "Check me!", Message::CheckboxToggled, ) - .style(self.theme.into()); + .style(self.theme); let toggler = Toggler::new( self.toggler_value, @@ -239,11 +239,11 @@ mod style { } } - impl From for &'static dyn checkbox::StyleSheet { + impl<'a> From for Box { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => &dark::Checkbox, + Theme::Dark => dark::Checkbox.into(), } } } -- cgit