From 0c76e0307ff7d4450c354812f8a25047f24948b4 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 31 Oct 2021 17:42:43 +0700 Subject: Reintroduce `Box` for `style_sheet` in `Slider` --- native/src/widget/slider.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'native') diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs index 977a5240..ee9db6cf 100644 --- a/native/src/widget/slider.rs +++ b/native/src/widget/slider.rs @@ -50,7 +50,7 @@ pub struct Slider<'a, T, Message> { on_release: Option, width: Length, height: u16, - style_sheet: &'a dyn StyleSheet, + style_sheet: Box, } impl<'a, T, Message> Slider<'a, T, Message> @@ -127,8 +127,11 @@ where } /// Sets the style of the [`Slider`]. - pub fn style(mut self, style_sheet: &'a dyn StyleSheet) -> Self { - self.style_sheet = style_sheet; + pub fn style( + mut self, + style_sheet: impl Into>, + ) -> Self { + self.style_sheet = style_sheet.into(); self } -- cgit