Skip to content

Commit

Permalink
Auto merge of #649 - AluisioASG:yaml-require-delimiter, r=kbknapp
Browse files Browse the repository at this point in the history
imp(YAML): supports setting Arg::require_delimiter from YAML

Seems this is missing from 920b559.
  • Loading branch information
homu committed Sep 6, 2016
2 parents fa5f853 + b9b55a3 commit fed1ff5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/args/arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ impl<'a, 'b> Arg<'a, 'b> {
"min_values" => yaml_to_u64!(a, v, min_values),
"value_name" => yaml_to_str!(a, v, value_name),
"use_delimiter" => yaml_to_bool!(a, v, use_delimiter),
"require_delimiter" => yaml_to_bool!(a, v, require_delimiter),
"value_delimiter" => yaml_to_str!(a, v, value_delimiter),
"required_unless" => yaml_to_str!(a, v, required_unless),
"display_order" => yaml_to_usize!(a, v, display_order),
Expand Down
5 changes: 5 additions & 0 deletions tests/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ args:
multiple: true
help: Tests mutliple values, not mult occs
value_names: [one, two]
- multvalsdelim:
long: multvalsdelim
help: Tests mutliple values with required delimiter
multiple: true
require_delimiter: true
- minvals2:
long: minvals2
multiple: true
Expand Down

0 comments on commit fed1ff5

Please sign in to comment.