mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 14:54:16 +00:00
fix: cargo doc
in projects using #[server]
(#476)
This commit is contained in:
parent
352601aa42
commit
45d4ebccd8
1 changed files with 2 additions and 2 deletions
|
@ -157,14 +157,14 @@ pub fn server_macro_impl(args: proc_macro::TokenStream, s: TokenStream2) -> Resu
|
|||
#encoding
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "ssr", doc))]
|
||||
#[cfg(feature = "ssr")]
|
||||
fn call_fn(self, cx: ::leptos::Scope) -> std::pin::Pin<Box<dyn std::future::Future<Output = Result<Self::Output, ::leptos::ServerFnError>>>> {
|
||||
let #struct_name { #(#field_names),* } = self;
|
||||
#cx_assign_statement;
|
||||
Box::pin(async move { #fn_name( #cx_fn_arg #(#field_names_2),*).await })
|
||||
}
|
||||
|
||||
#[cfg(any(not(feature = "ssr"), doc))]
|
||||
#[cfg(not(feature = "ssr"))]
|
||||
fn call_fn_client(self, cx: ::leptos::Scope) -> std::pin::Pin<Box<dyn std::future::Future<Output = Result<Self::Output, ::leptos::ServerFnError>>>> {
|
||||
let #struct_name { #(#field_names_3),* } = self;
|
||||
Box::pin(async move { #fn_name( #cx_fn_arg #(#field_names_4),*).await })
|
||||
|
|
Loading…
Reference in a new issue