From 750d186c307a127cb807feee2d7175977cfdb1c2 Mon Sep 17 00:00:00 2001 From: Alan K Date: Fri, 20 Jul 2018 16:17:45 +0200 Subject: [PATCH] Updates to multiple occurences for v3-clap --- src/derives/clap.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/derives/clap.rs b/src/derives/clap.rs index a7c20da0..45f4cde8 100644 --- a/src/derives/clap.rs +++ b/src/derives/clap.rs @@ -103,7 +103,9 @@ fn gen_app_augmentation( Ty::Bool => quote!( .takes_value(false).multiple(false) ), Ty::Option => quote!( .takes_value(true).multiple(false) #validator ), Ty::Vec => quote!( .takes_value(true).multiple(true) #validator ), - Ty::Other if occurences => quote!( .takes_value(false).multiple(true) ), + Ty::Other if occurences => { + quote!( .takes_value(false).multiple_occurrences(true) ) + } Ty::Other => { let required = !attrs.has_method("default_value"); quote!( .takes_value(true).multiple(false).required(#required) #validator )