Add missing bounds to Themed

This commit is contained in:
Marshall Bowers 2023-10-24 14:30:26 +02:00
parent 2285a35016
commit 8117e7933c

View file

@ -150,7 +150,8 @@ pub struct Themed<E> {
impl<E> IntoAnyElement<E::ViewState> for Themed<E>
where
E: Element,
E: 'static + Element + Send + Sync,
E::ElementState: Send + Sync,
{
fn into_any(self) -> AnyElement<E::ViewState> {
AnyElement::new(self)
@ -160,7 +161,10 @@ where
#[derive(Default)]
struct ThemeStack(Vec<Theme>);
impl<E: Element> Element for Themed<E> {
impl<E: 'static + Element + Send + Sync> Element for Themed<E>
where
E::ElementState: Send + Sync,
{
type ViewState = E::ViewState;
type ElementState = E::ElementState;