summaryrefslogtreecommitdiffstats
path: root/style/src/rule.rs
diff options
context:
space:
mode:
Diffstat (limited to 'style/src/rule.rs')
-rw-r--r--style/src/rule.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/style/src/rule.rs b/style/src/rule.rs
index 221f48fb..12a40f7d 100644
--- a/style/src/rule.rs
+++ b/style/src/rule.rs
@@ -1,5 +1,4 @@
//! Display a horizontal or vertical rule for dividing content.
-
use iced_core::Color;
/// The fill mode of a rule.
@@ -104,15 +103,15 @@ impl StyleSheet for Default {
}
}
-impl std::default::Default for Box<dyn StyleSheet> {
+impl<'a> std::default::Default for Box<dyn StyleSheet + 'a> {
fn default() -> Self {
Box::new(Default)
}
}
-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)