mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-28 05:32:42 -05:00
Compare commits
2 Commits
4315
...
actix-nons
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4826d27b5 | ||
|
|
92c6a2a89e |
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -918,7 +918,7 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
||||
|
||||
[[package]]
|
||||
name = "either_of"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
@@ -188,6 +188,20 @@ pub fn server_macro_impl(
|
||||
})
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
|
||||
// we need to apply the same sort of Actix SendWrapper workaround here
|
||||
// that we do for the body of the function provided in the trait (see below)
|
||||
if cfg!(feature = "actix") {
|
||||
let block = body.block.to_token_stream();
|
||||
body.block = quote! {
|
||||
{
|
||||
#server_fn_path::actix::SendWrapper::new(async move {
|
||||
#block
|
||||
})
|
||||
.await
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
let dummy = body.to_dummy_output();
|
||||
let dummy_name = body.to_dummy_ident();
|
||||
let args = syn::parse::<ServerFnArgs>(args.into())?;
|
||||
|
||||
Reference in New Issue
Block a user