summaryrefslogtreecommitdiffstats
path: root/style/src/slider.rs
diff options
context:
space:
mode:
Diffstat (limited to 'style/src/slider.rs')
-rw-r--r--style/src/slider.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/style/src/slider.rs b/style/src/slider.rs
index c6791c3d..918e7753 100644
--- a/style/src/slider.rs
+++ b/style/src/slider.rs
@@ -79,8 +79,17 @@ impl StyleSheet for Default {
}
}
-impl std::default::Default for &'static dyn StyleSheet {
+impl std::default::Default for Box<dyn StyleSheet> {
fn default() -> Self {
- &Default
+ Box::new(Default)
+ }
+}
+
+impl<'a, T> From<T> for Box<dyn StyleSheet + 'a>
+where
+ T: StyleSheet + 'a,
+{
+ fn from(style_sheet: T) -> Self {
+ Box::new(style_sheet)
}
}