mirror of
https://github.com/Drop-OSS/interactive-clap.git
synced 2026-01-30 20:55:25 +01:00
fixed unnamed_args/args_without_attrs conflict
This commit is contained in:
@@ -25,7 +25,9 @@ pub fn impl_to_cli_args(ast: &syn::DeriveInput) -> TokenStream {
|
||||
} else {
|
||||
args_subcommand
|
||||
};
|
||||
if let Some(args_without_attrs) =
|
||||
if let Some(unnamed_args) = interactive_clap_attrs_cli_field.unnamed_args {
|
||||
args_push_front_vec.push(unnamed_args)
|
||||
} else if let Some(args_without_attrs) =
|
||||
interactive_clap_attrs_cli_field.args_without_attrs
|
||||
{
|
||||
args_push_front_vec.push(args_without_attrs)
|
||||
@@ -33,9 +35,6 @@ pub fn impl_to_cli_args(ast: &syn::DeriveInput) -> TokenStream {
|
||||
if let Some(named_args) = interactive_clap_attrs_cli_field.named_args {
|
||||
args_push_front_vec.push(named_args)
|
||||
};
|
||||
if let Some(unnamed_args) = interactive_clap_attrs_cli_field.unnamed_args {
|
||||
args_push_front_vec.push(unnamed_args)
|
||||
};
|
||||
}
|
||||
let args_push_front_vec = args_push_front_vec.into_iter().rev();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user