Introduce state lifetime for style_sheet in Toggler
This commit is contained in:
parent
0d3c9ef7bd
commit
c9ed15782c
5 changed files with 16 additions and 13 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue