Skip to content

Commit

Permalink
docs(Conditional Default Values): fixes the failing doc tests of Arg:…
Browse files Browse the repository at this point in the history
…:default_value_ifs
  • Loading branch information
kbknapp committed Dec 29, 2016
1 parent 7f296e2 commit 4ef0910
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/args/arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2671,7 +2671,7 @@ impl<'a, 'b> Arg<'a, 'b> {
/// .default_value_ifs(&[
/// ("flag", None, "default"),
/// ("opt", Some("channal"), "chan"),
/// ])
/// ]))
/// .get_matches_from(vec![
/// "dvif", "--opt", "channal"
/// ]);
Expand All @@ -2691,7 +2691,7 @@ impl<'a, 'b> Arg<'a, 'b> {
/// .default_value_ifs(&[
/// ("flag", None, "default"),
/// ("opt", Some("channal"), "chan"),
/// ])
/// ]))
/// .get_matches_from(vec![
/// "dvif"
/// ]);
Expand All @@ -2707,12 +2707,15 @@ impl<'a, 'b> Arg<'a, 'b> {
/// let m = App::new("dvif")
/// .arg(Arg::with_name("flag")
/// .long("flag"))
/// .arg(Arg::with_name("opt")
/// .long("opt")
/// .takes_value(true))
/// .arg(Arg::with_name("other")
/// .long("other")
/// .default_value_ifs(&[
/// ("flag", None, "default"),
/// ("opt", Some("channal"), "chan"),
/// ])
/// ]))
/// .get_matches_from(vec![
/// "dvif", "--opt", "channal", "--flag"
/// ]);
Expand Down

0 comments on commit 4ef0910

Please sign in to comment.