diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/scrollable/src/main.rs | 2 | ||||
-rw-r--r-- | examples/scrollable/src/style.rs | 4 | ||||
-rw-r--r-- | examples/styling/src/main.rs | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs index 2eaf197e..272f0ce2 100644 --- a/examples/scrollable/src/main.rs +++ b/examples/scrollable/src/main.rs @@ -76,7 +76,7 @@ impl Sandbox for ScrollableDemo { Some(*theme), Message::ThemeChanged, ) - .style(theme.clone().into()), + .style(*theme), ) }, ); diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs index 068483cb..3c8e5234 100644 --- a/examples/scrollable/src/style.rs +++ b/examples/scrollable/src/style.rs @@ -25,11 +25,11 @@ impl<'a> From<Theme> for Box<dyn container::StyleSheet + 'a> { } } -impl From<Theme> for &'static dyn radio::StyleSheet { +impl<'a> From<Theme> for Box<dyn radio::StyleSheet + 'a> { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => &dark::Radio, + Theme::Dark => dark::Radio.into(), } } } 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<Theme> for &'static dyn radio::StyleSheet { + impl<'a> From<Theme> for Box<dyn radio::StyleSheet + 'a> { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => &dark::Radio, + Theme::Dark => dark::Radio.into(), } } } |