aboutsummaryrefslogtreecommitdiff
path: root/mingling_macros/src/chain.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-26 07:19:44 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-26 07:19:44 +0800
commit8a796ecbe4d8edb9c8e67b9fc44028d3778113ab (patch)
tree7ecdcc690ec7dae783a8ca47b95983210f005a72 /mingling_macros/src/chain.rs
parentd1a74ce57e5be72436376a829e9c7e1e7c1c561b (diff)
feat(macros): simplify ResultEmpty to a unit struct
Diffstat (limited to 'mingling_macros/src/chain.rs')
-rw-r--r--mingling_macros/src/chain.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/mingling_macros/src/chain.rs b/mingling_macros/src/chain.rs
index 2abf3c1..6191d39 100644
--- a/mingling_macros/src/chain.rs
+++ b/mingling_macros/src/chain.rs
@@ -83,7 +83,7 @@ fn generate_proc_fn(
stmts.push(syn::Stmt::Expr(
syn::parse_quote! {
<crate::ResultEmpty as ::mingling::Groupped::<crate::ThisProgram>>
- ::to_chain(crate::ResultEmpty::new(()))
+ ::to_chain(crate::ResultEmpty)
},
None,
));
@@ -111,7 +111,7 @@ fn generate_proc_fn(
quote! {
#call
<crate::ResultEmpty as ::mingling::Groupped::<crate::ThisProgram>>
- ::to_chain(crate::ResultEmpty::new(()))
+ ::to_chain(crate::ResultEmpty)
}
}
} else if has_resources {
@@ -169,7 +169,7 @@ fn generate_original_fn(
quote! {
{
#fn_body
- <crate::ResultEmpty as ::mingling::Groupped::<crate::ThisProgram>>::to_chain(crate::ResultEmpty::new(()))
+ <crate::ResultEmpty as ::mingling::Groupped::<crate::ThisProgram>>::to_chain(crate::ResultEmpty)
}
}
} else {