From 40a5de581144886571504b762719f057dbb2e871 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 31 Oct 2021 17:02:59 +0700 Subject: Reintroduce `Box` for `style_sheet` in `Container` --- web/src/widget/container.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/src/widget') diff --git a/web/src/widget/container.rs b/web/src/widget/container.rs index e61600c4..8e345b9a 100644 --- a/web/src/widget/container.rs +++ b/web/src/widget/container.rs @@ -19,7 +19,7 @@ pub struct Container<'a, Message> { max_height: u32, horizontal_alignment: alignment::Horizontal, vertical_alignment: alignment::Vertical, - style_sheet: &'a dyn StyleSheet, + style_sheet: Box, content: Element<'a, Message>, } @@ -89,8 +89,8 @@ impl<'a, Message> Container<'a, Message> { } /// Sets the style of the [`Container`]. - pub fn style(mut self, style: &'a dyn StyleSheet) -> Self { - self.style_sheet = style; + pub fn style(mut self, style: impl Into>) -> Self { + self.style_sheet = style.into(); self } } -- cgit