From 48490c3d878da1e2760c7701e80586c3653d5bd8 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 31 Oct 2021 17:34:58 +0700 Subject: Introduce state lifetime for `style_sheet` in `Rule` --- style/src/rule.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'style/src/rule.rs') 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 { } } -impl From for Box +impl<'a, T> From for Box where - T: 'static + StyleSheet, + T: 'a + StyleSheet, { fn from(style: T) -> Self { Box::new(style) -- cgit From 631e95ee0be01dc7f5e5183e1429972aee37787f Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 2 Nov 2021 15:03:29 +0700 Subject: Move `viewport` argument to last position in `mouse_interaction` methods This keeps the order of the arguments consistent with `draw`. --- style/src/rule.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'style/src/rule.rs') diff --git a/style/src/rule.rs b/style/src/rule.rs index 7276bc19..997bb1e9 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. -- cgit From 157a40a56882ec1959034fa499b383e7f633aaf8 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 2 Nov 2021 16:02:05 +0700 Subject: Introduce generic lifetime to `Default` implementation for style sheets --- style/src/rule.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'style/src/rule.rs') diff --git a/style/src/rule.rs b/style/src/rule.rs index 997bb1e9..12a40f7d 100644 --- a/style/src/rule.rs +++ b/style/src/rule.rs @@ -103,7 +103,7 @@ impl StyleSheet for Default { } } -impl std::default::Default for Box { +impl<'a> std::default::Default for Box { fn default() -> Self { Box::new(Default) } -- cgit