summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--native/src/widget/pick_list.rs4
-rw-r--r--style/src/pick_list.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/native/src/widget/pick_list.rs b/native/src/widget/pick_list.rs
index 3a393e14..9d2f63db 100644
--- a/native/src/widget/pick_list.rs
+++ b/native/src/widget/pick_list.rs
@@ -36,7 +36,7 @@ where
padding: Padding,
text_size: Option<u16>,
font: Renderer::Font,
- style_sheet: Box<dyn StyleSheet>,
+ style_sheet: Box<dyn StyleSheet + 'a>,
}
/// The local state of a [`PickList`].
@@ -138,7 +138,7 @@ where
/// Sets the style of the [`PickList`].
pub fn style(
mut self,
- style_sheet: impl Into<Box<dyn StyleSheet>>,
+ style_sheet: impl Into<Box<dyn StyleSheet + 'a>>,
) -> Self {
self.style_sheet = style_sheet.into();
self
diff --git a/style/src/pick_list.rs b/style/src/pick_list.rs
index d1801e5f..ca1fbe17 100644
--- a/style/src/pick_list.rs
+++ b/style/src/pick_list.rs
@@ -62,9 +62,9 @@ impl std::default::Default for Box<dyn StyleSheet> {
}
}
-impl<T> From<T> for Box<dyn StyleSheet>
+impl<'a, T> From<T> for Box<dyn StyleSheet + 'a>
where
- T: 'static + StyleSheet,
+ T: 'a + StyleSheet,
{
fn from(style: T) -> Self {
Box::new(style)