fix: IntoView impl for Rc<dyn Fn() -> impl IntoView> (#1698)

This commit is contained in:
Baptiste 2023-09-14 01:55:08 +02:00 committed by GitHub
parent 8245d77738
commit 8d690ac146
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,6 +137,17 @@ where
}
}
impl<N> IntoView for std::rc::Rc<dyn Fn() -> N>
where
N: IntoView + 'static,
{
#[inline]
fn into_view(self) -> View {
// reuse impl for `Fn() -> impl IntoView`
IntoView::into_view(move || self())
}
}
#[cfg(not(feature = "nightly"))]
impl<T> IntoView for ReadSignal<T>
where