diff options
Diffstat (limited to 'style')
| -rw-r--r-- | style/src/radio.rs | 13 | 
1 files changed, 11 insertions, 2 deletions
diff --git a/style/src/radio.rs b/style/src/radio.rs index add12754..724ae807 100644 --- a/style/src/radio.rs +++ b/style/src/radio.rs @@ -37,8 +37,17 @@ impl StyleSheet for Default {      }  } -impl std::default::Default for &'static dyn StyleSheet { +impl std::default::Default for Box<dyn StyleSheet> {      fn default() -> Self { -        &Default +        Box::new(Default) +    } +} + +impl<'a, T> From<T> for Box<dyn StyleSheet + 'a> +where +    T: StyleSheet + 'a, +{ +    fn from(style_sheet: T) -> Self { +        Box::new(style_sheet)      }  }  | 
