From f121a8bdf6cffd1c5f1a3bb4f25eaffb42a6d209 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 5 Oct 2022 16:03:48 -0500 Subject: [PATCH] fix(derive): Better subcommand type errors for Vec --- clap_derive/src/derives/args.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clap_derive/src/derives/args.rs b/clap_derive/src/derives/args.rs index 915e717e..97c85ad7 100644 --- a/clap_derive/src/derives/args.rs +++ b/clap_derive/src/derives/args.rs @@ -410,7 +410,6 @@ pub fn gen_constructor(fields: &[(&Field, Item)]) -> TokenStream { } } }, - Ty::Vec | Ty::Other => { quote_spanned! { kind.span()=> #field_name: { @@ -418,6 +417,7 @@ pub fn gen_constructor(fields: &[(&Field, Item)]) -> TokenStream { } } }, + Ty::Vec | Ty::OptionOption | Ty::OptionVec => { abort!(