diff options
| author | 2021-10-31 17:14:10 +0700 | |
|---|---|---|
| committer | 2021-10-31 17:14:10 +0700 | |
| commit | bd7b086ec1f9d428945f05fb12bda157f9e77dfd (patch) | |
| tree | 4be12be5f1c96d54233633ba14bd6e0360a7fa7f /web/src/widget | |
| parent | d758006ee91aa0fdb70eaa67abbfad36be02c7be (diff) | |
| download | iced-bd7b086ec1f9d428945f05fb12bda157f9e77dfd.tar.gz iced-bd7b086ec1f9d428945f05fb12bda157f9e77dfd.tar.bz2 iced-bd7b086ec1f9d428945f05fb12bda157f9e77dfd.zip  | |
Reintroduce `Box` for `style_sheet` in `Radio`
Diffstat (limited to '')
| -rw-r--r-- | web/src/widget/radio.rs | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/web/src/widget/radio.rs b/web/src/widget/radio.rs index 5e9eaa3f..03b2922b 100644 --- a/web/src/widget/radio.rs +++ b/web/src/widget/radio.rs @@ -38,7 +38,7 @@ pub struct Radio<'a, Message> {      id: Option<String>,      name: Option<String>,      #[allow(dead_code)] -    style_sheet: &'a dyn StyleSheet, +    style_sheet: Box<dyn StyleSheet + 'a>,  }  impl<'a, Message> Radio<'a, Message> { @@ -71,8 +71,11 @@ impl<'a, Message> Radio<'a, Message> {      }      /// Sets the style of the [`Radio`] button. -    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<Box<dyn StyleSheet + 'a>>, +    ) -> Self { +        self.style_sheet = style_sheet.into();          self      }  | 
