summaryrefslogtreecommitdiffstats
path: root/style
diff options
context:
space:
mode:
Diffstat (limited to 'style')
-rw-r--r--style/src/button.rs8
-rw-r--r--style/src/checkbox.rs8
-rw-r--r--style/src/container.rs8
-rw-r--r--style/src/pane_grid.rs8
-rw-r--r--style/src/pick_list.rs4
-rw-r--r--style/src/progress_bar.rs4
-rw-r--r--style/src/radio.rs8
-rw-r--r--style/src/rule.rs4
-rw-r--r--style/src/scrollable.rs8
-rw-r--r--style/src/slider.rs8
-rw-r--r--style/src/text_input.rs8
-rw-r--r--style/src/toggler.rs4
12 files changed, 40 insertions, 40 deletions
diff --git a/style/src/button.rs b/style/src/button.rs
index 2281e32f..ff4f61c3 100644
--- a/style/src/button.rs
+++ b/style/src/button.rs
@@ -86,11 +86,11 @@ 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: StyleSheet + 'a,
{
- fn from(style: T) -> Self {
- Box::new(style)
+ fn from(style_sheet: T) -> Self {
+ Box::new(style_sheet)
}
}
diff --git a/style/src/checkbox.rs b/style/src/checkbox.rs
index 566136bb..09f997fb 100644
--- a/style/src/checkbox.rs
+++ b/style/src/checkbox.rs
@@ -45,11 +45,11 @@ 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: StyleSheet + 'a,
{
- fn from(style: T) -> Self {
- Box::new(style)
+ fn from(style_sheet: T) -> Self {
+ Box::new(style_sheet)
}
}
diff --git a/style/src/container.rs b/style/src/container.rs
index 1ce6a7ca..a5dc700e 100644
--- a/style/src/container.rs
+++ b/style/src/container.rs
@@ -49,11 +49,11 @@ 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: StyleSheet + 'a,
{
- fn from(style: T) -> Self {
- Box::new(style)
+ fn from(style_sheet: T) -> Self {
+ Box::new(style_sheet)
}
}
diff --git a/style/src/pane_grid.rs b/style/src/pane_grid.rs
index e39ee797..89cf39ea 100644
--- a/style/src/pane_grid.rs
+++ b/style/src/pane_grid.rs
@@ -41,11 +41,11 @@ 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: StyleSheet + 'a,
{
- fn from(style: T) -> Self {
- Box::new(style)
+ fn from(style_sheet: T) -> Self {
+ Box::new(style_sheet)
}
}
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)
diff --git a/style/src/progress_bar.rs b/style/src/progress_bar.rs
index d0878c84..e829c68f 100644
--- a/style/src/progress_bar.rs
+++ b/style/src/progress_bar.rs
@@ -32,9 +32,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)
diff --git a/style/src/radio.rs b/style/src/radio.rs
index c41b70c0..724ae807 100644
--- a/style/src/radio.rs
+++ b/style/src/radio.rs
@@ -43,11 +43,11 @@ 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: StyleSheet + 'a,
{
- fn from(style: T) -> Self {
- Box::new(style)
+ fn from(style_sheet: T) -> Self {
+ Box::new(style_sheet)
}
}
diff --git a/style/src/rule.rs b/style/src/rule.rs
index 221f48fb..7276bc19 100644
--- a/style/src/rule.rs
+++ b/style/src/rule.rs
@@ -110,9 +110,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)
diff --git a/style/src/scrollable.rs b/style/src/scrollable.rs
index 65da9803..9de72add 100644
--- a/style/src/scrollable.rs
+++ b/style/src/scrollable.rs
@@ -66,11 +66,11 @@ 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: StyleSheet + 'a,
{
- fn from(style: T) -> Self {
- Box::new(style)
+ fn from(style_sheet: T) -> Self {
+ Box::new(style_sheet)
}
}
diff --git a/style/src/slider.rs b/style/src/slider.rs
index 9148fcbe..918e7753 100644
--- a/style/src/slider.rs
+++ b/style/src/slider.rs
@@ -85,11 +85,11 @@ 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: StyleSheet + 'a,
{
- fn from(style: T) -> Self {
- Box::new(style)
+ fn from(style_sheet: T) -> Self {
+ Box::new(style_sheet)
}
}
diff --git a/style/src/text_input.rs b/style/src/text_input.rs
index 19acea65..4260af84 100644
--- a/style/src/text_input.rs
+++ b/style/src/text_input.rs
@@ -79,11 +79,11 @@ 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: StyleSheet + 'a,
{
- fn from(style: T) -> Self {
- Box::new(style)
+ fn from(style_sheet: T) -> Self {
+ Box::new(style_sheet)
}
}
diff --git a/style/src/toggler.rs b/style/src/toggler.rs
index 5a155123..16c014e6 100644
--- a/style/src/toggler.rs
+++ b/style/src/toggler.rs
@@ -47,9 +47,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)