summaryrefslogtreecommitdiffstats
path: root/style/src/rule.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-11-07 15:15:33 +0700
committerLibravatar GitHub <noreply@github.com>2021-11-07 15:15:33 +0700
commiteafad00af2a9bae9f3ed8124e2a6f6e59ee5d253 (patch)
tree76413948c9c9723075189d51d4c2e02c0f8fdd23 /style/src/rule.rs
parent61c747b53589d98f477fea95f85d2ea5349666d3 (diff)
parent07b5097bc92ced376d09115d787ff1d2ebe00836 (diff)
downloadiced-eafad00af2a9bae9f3ed8124e2a6f6e59ee5d253.tar.gz
iced-eafad00af2a9bae9f3ed8124e2a6f6e59ee5d253.tar.bz2
iced-eafad00af2a9bae9f3ed8124e2a6f6e59ee5d253.zip
Merge pull request #1110 from iced-rs/remove-renderer-traits
Reduce the surface of the `Renderer` APIs
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)