Reintroduce Box for style_sheet in TextInput
This commit is contained in:
parent
0c76e0307f
commit
0d3c9ef7bd
4 changed files with 25 additions and 10 deletions
|
|
@ -73,8 +73,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