fixed unnamed_args/args_without_attrs conflict
This commit is contained in:
parent
a844585c61
commit
0f4e7d51a7
1 changed files with 3 additions and 4 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue