Skip to content

Commit

Permalink
fix(derive): Better subcommand type errors for Vec
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 5, 2022
1 parent 4f17f99 commit f121a8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clap_derive/src/derives/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,14 +410,14 @@ pub fn gen_constructor(fields: &[(&Field, Item)]) -> TokenStream {
}
}
},
Ty::Vec |
Ty::Other => {
quote_spanned! { kind.span()=>
#field_name: {
<#subcmd_type as clap::FromArgMatches>::from_arg_matches_mut(#arg_matches)?
}
}
},
Ty::Vec |
Ty::OptionOption |
Ty::OptionVec => {
abort!(
Expand Down

0 comments on commit f121a8b

Please sign in to comment.