Introduce state lifetime for style_sheet in Rule

This commit is contained in:
Héctor Ramón Jiménez 2021-10-31 17:34:58 +07:00
parent bd7b086ec1
commit 48490c3d87
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 9 additions and 9 deletions

View file

@ -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)