From 88c3cbb27cc840d38e16ae8ab39c9a168a653a88 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 3 Aug 2026 01:38:42 +0800 Subject: chore: use idiomatic boolean and reference patterns --- mingling_macros/src/attr/dispatcher_clap.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mingling_macros/src/attr/dispatcher_clap.rs b/mingling_macros/src/attr/dispatcher_clap.rs index 40f7d47..218750c 100644 --- a/mingling_macros/src/attr/dispatcher_clap.rs +++ b/mingling_macros/src/attr/dispatcher_clap.rs @@ -39,7 +39,7 @@ impl Parse for ClapOptions { error_struct = Some(value); } else if key == "help" { let value: LitBool = input.parse()?; - if value.value() == false { + if !value.value() { // help = false is allowed but does nothing help_enabled = false; } else { @@ -171,7 +171,7 @@ pub(crate) fn dispatcher_clap_attr(attr: TokenStream, item: TokenStream) -> Toke }; let dispatch_tree_entry = - get_dispatch_tree_entry(&command_name_str, dispatcher_struct, &struct_name); + get_dispatch_tree_entry(&command_name_str, dispatcher_struct, struct_name); let expanded = quote! { // Keep the original struct definition -- cgit