@@ -32,8 +32,8 @@ pub fn signal(input: TokenStream) -> TokenStream {
3232 let ident_set = format_ident ! ( "{}_set" , ident) ;
3333 let ident_fn = format_ident ! ( "{}" , ident) ;
3434
35- let lazy_ty = quote ! { once_cell:: unsync:: Lazy <std:: rc:: Rc <cache :: Signal <#ty>>> } ;
36- let expr = quote ! { once_cell:: unsync:: Lazy :: new( || cache :: Signal :: new( Some ( #expr) ) ) } ;
35+ let lazy_ty = quote ! { once_cell:: unsync:: Lazy <std:: rc:: Rc <reactive_cache :: Signal <#ty>>> } ;
36+ let expr = quote ! { once_cell:: unsync:: Lazy :: new( || reactive_cache :: Signal :: new( Some ( #expr) ) ) } ;
3737
3838 let expanded = quote ! {
3939 #( #attrs) *
@@ -86,8 +86,9 @@ pub fn memo(_attr: TokenStream, item: TokenStream) -> TokenStream {
8686 }
8787
8888 let ident = format_ident ! ( "{}" , ident. to_string( ) . to_uppercase( ) ) ;
89- let ty = quote ! { once_cell:: unsync:: Lazy <cache:: Memo <#output_ty, fn ( ) -> #output_ty>> } ;
90- let expr = quote ! { once_cell:: unsync:: Lazy :: new( || cache:: Memo :: new( || #block) ) } ;
89+ let ty =
90+ quote ! { once_cell:: unsync:: Lazy <reactive_cache:: Memo <#output_ty, fn ( ) -> #output_ty>> } ;
91+ let expr = quote ! { once_cell:: unsync:: Lazy :: new( || reactive_cache:: Memo :: new( || #block) ) } ;
9192
9293 let expanded = quote ! {
9394 static mut #ident: #ty = #expr;
@@ -110,12 +111,12 @@ pub fn effect(input: TokenStream) -> TokenStream {
110111 Expr :: Path ( path) if path. path . get_ident ( ) . is_some ( ) => {
111112 let ident = path. path . get_ident ( ) . unwrap ( ) ;
112113 quote ! {
113- cache :: Effect :: new( #ident)
114+ reactive_cache :: Effect :: new( #ident)
114115 }
115116 }
116117 Expr :: Closure ( closure) => {
117118 quote ! {
118- cache :: Effect :: new( #closure)
119+ reactive_cache :: Effect :: new( #closure)
119120 }
120121 }
121122 _ => {
0 commit comments