@@ -5,27 +5,27 @@ macro_rules! renderer_fn {
55 ) => {
66 #[ derive( Clone ) ]
77 pub struct $name<$( $ty) ,* > (
8- Rc <dyn Fn ( $( $arg_ty) ,* ) -> AnyView < Dom > >,
8+ Arc <dyn Fn ( $( $arg_ty) ,* ) -> AnyView + Sync + Send + ' static >,
99 )
1010 where $( $clause) * ;
1111
1212 impl <F , Ret , $( $ty) ,* > From <F > for $name<$( $ty) ,* >
1313 where
14- F : Fn ( $( $arg_ty) ,* ) -> Ret + ' static ,
15- Ret : IntoView ,
14+ F : Fn ( $( $arg_ty) ,* ) -> Ret + Sync + Send + ' static ,
15+ Ret : IntoView + ' static ,
1616 $( $clause) *
1717 {
1818 fn from( f: F ) -> Self {
19- Self ( Rc :: new( move |$( $arg_name) ,* | {
20- f( $( $arg_name) ,* ) . into_view ( )
19+ Self ( Arc :: new( move |$( $arg_name) ,* | {
20+ f( $( $arg_name) ,* ) . into_any ( )
2121 } ) )
2222 }
2323 }
2424
2525 impl <$( $ty) ,* > $name <$( $ty) ,* >
2626 where $( $clause) *
2727 {
28- pub fn run( & self , $( $arg_name: $arg_ty) ,* ) -> AnyView < Dom > {
28+ pub fn run( & self , $( $arg_name: $arg_ty) ,* ) -> AnyView {
2929 ( self . 0 ) ( $( $arg_name) ,* )
3030 }
3131 }
@@ -45,8 +45,8 @@ macro_rules! renderer_fn {
4545 where $( $clause) *
4646 {
4747 fn default ( ) -> Self {
48- Self ( Rc :: new( move |$( $arg_name) ,* | {
49- $default( $( $arg_name) ,* ) . into_view ( )
48+ Self ( Arc :: new( move |$( $arg_name) ,* | {
49+ $default( $( $arg_name) ,* ) . into_any ( )
5050 } ) )
5151 }
5252 }
0 commit comments