remove Rc from the Component type alias

This commit is contained in:
Evan Almloff committed 2024-01-30 12:29:47 -06:00
1 parent 11555e4a51
commit aa03a6316a
2 files changed
+1 -8

No files matched your search

-7
View File
@@ -106,13 +106,6 @@ pub trait ComponentFunction<Props, Marker = ()>: Clone + 'static {
fn rebuild(&self, props: Props) -> Element;
}
/// Accept pre-formed component render functions as components
impl<P: 'static> ComponentFunction<P> for Component<P> {
fn rebuild(&self, props: P) -> Element {
(self)(props)
}
}
/// Accept any callbacks that take props
impl<F: Fn(P) -> Element + Clone + 'static, P> ComponentFunction<P> for F {
fn rebuild(&self, props: P) -> Element {