mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 23:02:31 +00:00
Updates to multiple occurences for v3-clap
This commit is contained in:
parent
09b39eac0a
commit
750d186c30
1 changed files with 3 additions and 1 deletions
|
@ -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 )
|
||||
|
|
Loading…
Reference in a new issue