From 6edaa76d67ab1ff211c7cc9cd179ffbefe93a04f Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 29 May 2026 17:13:36 +0800 Subject: Rename error types with consistent naming convention --- mingling_macros/src/chain.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mingling_macros/src/chain.rs') diff --git a/mingling_macros/src/chain.rs b/mingling_macros/src/chain.rs index 559468c..ac05480 100644 --- a/mingling_macros/src/chain.rs +++ b/mingling_macros/src/chain.rs @@ -95,7 +95,7 @@ fn generate_proc_fn( let body_stmts: &[syn::Stmt] = if is_unit_return && has_resources { let mut stmts = fn_body_stmts.to_vec(); stmts.push(syn::Stmt::Expr( - syn::parse_quote! { crate::EmptyResult::new(()).to_chain() }, + syn::parse_quote! { crate::ResultEmpty::new(()).to_chain() }, None, )); // Box::leak to get a &'static [syn::Stmt] @@ -106,7 +106,7 @@ fn generate_proc_fn( let wrapped_body = wrap_body_with_mut_resources(body_stmts, &mut_resources, program_type); - // When the function returns `()`, wrap the result with EmptyResult + // When the function returns `()`, wrap the result with ResultEmpty let call_or_wrapped = if is_unit_return { if has_resources { quote! { @@ -121,7 +121,7 @@ fn generate_proc_fn( }; quote! { #call - crate::EmptyResult::new(()).to_chain() + crate::ResultEmpty::new(()).to_chain() } } } else if has_resources { @@ -179,7 +179,7 @@ fn generate_original_fn( quote! { { #fn_body - crate::EmptyResult::new(()).to_chain() + crate::ResultEmpty::new(()).to_chain() } } } else { -- cgit