Remove more Send bounds and simplify view rendering
This commit is contained in:
parent
6cab5c2885
commit
64ad8943ba
17 changed files with 720 additions and 534 deletions
|
@ -219,7 +219,7 @@ impl<V, E, F> Element<V> for Option<F>
|
|||
where
|
||||
V: 'static,
|
||||
E: 'static + Component<V>,
|
||||
F: FnOnce(&mut V, &mut ViewContext<'_, '_, V>) -> E + 'static,
|
||||
F: FnOnce(&mut V, &mut ViewContext<'_, V>) -> E + 'static,
|
||||
{
|
||||
type ElementState = AnyElement<V>;
|
||||
|
||||
|
@ -263,7 +263,7 @@ impl<V, E, F> Component<V> for Option<F>
|
|||
where
|
||||
V: 'static,
|
||||
E: 'static + Component<V>,
|
||||
F: FnOnce(&mut V, &mut ViewContext<'_, '_, V>) -> E + 'static,
|
||||
F: FnOnce(&mut V, &mut ViewContext<'_, V>) -> E + 'static,
|
||||
{
|
||||
fn render(self) -> AnyElement<V> {
|
||||
AnyElement::new(self)
|
||||
|
@ -274,7 +274,7 @@ impl<V, E, F> Component<V> for F
|
|||
where
|
||||
V: 'static,
|
||||
E: 'static + Component<V>,
|
||||
F: FnOnce(&mut V, &mut ViewContext<'_, '_, V>) -> E + 'static,
|
||||
F: FnOnce(&mut V, &mut ViewContext<'_, V>) -> E + 'static,
|
||||
{
|
||||
fn render(self) -> AnyElement<V> {
|
||||
AnyElement::new(Some(self))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue