Reintroduce Box for style_sheet in Radio
This commit is contained in:
parent
d758006ee9
commit
bd7b086ec1
6 changed files with 29 additions and 14 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue