From cf8e1fc319cf5af51bdfacbcf26ad4f026c08bb7 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Jul 2022 12:35:49 -0500 Subject: [PATCH] fix(derive): Make `Option>` work per occurrence --- clap_derive/src/derives/args.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clap_derive/src/derives/args.rs b/clap_derive/src/derives/args.rs index 8942678b..73d56f6e 100644 --- a/clap_derive/src/derives/args.rs +++ b/clap_derive/src/derives/args.rs @@ -258,8 +258,7 @@ pub fn gen_augment( Ty::OptionOption => quote_spanned! { ty.span()=> .value_name(#value_name) - .min_values(0) - .max_values(1) + .number_of_values(0..=1) #value_parser #action },