Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm0 committed May 28, 2022
1 parent 7a882e5 commit ec78867
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clap_derive/src/derives/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ pub fn gen_augment(
.number_of_values(#len)
#possible_values
#validator
#allow_invalid_utf8
#value_parser
}
}

Expand All @@ -339,7 +339,7 @@ pub fn gen_augment(
.number_of_values(#len)
#possible_values
#validator
#allow_invalid_utf8
#value_parser
}
}

Expand Down Expand Up @@ -656,10 +656,10 @@ fn gen_parsers(
},

Ty::OptionArray => quote_spanned! { ty.span()=>
if #arg_matches.is_present(#name) {
if #arg_matches.is_present(#id) {
Some(
std::convert::TryInto::try_into(
#arg_matches.#values_of(#name)
#arg_matches.#get_many(#id)
.map(|v| v.map::<::std::result::Result<#convert_type, clap::Error>, _>(#parse).collect::<::std::result::Result<Vec<_>, clap::Error>>())
.transpose()?
.unwrap_or_else(Vec::new)
Expand All @@ -682,7 +682,7 @@ fn gen_parsers(
Ty::Array => {
quote_spanned! { ty.span()=>
std::convert::TryInto::try_into(
#arg_matches.#values_of(#name)
#arg_matches.#get_many(#id)
.map(|v| v.map::<::std::result::Result<#convert_type, clap::Error>, _>(#parse).collect::<::std::result::Result<Vec<_>, clap::Error>>())
.transpose()?
.unwrap_or_else(Vec::new)
Expand Down

0 comments on commit ec78867

Please sign in to comment.