From 4ef091019c083b4db1a0c13f1c1e95ac363259f2 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Wed, 14 Dec 2016 12:08:51 -0500 Subject: [PATCH] docs(Conditional Default Values): fixes the failing doc tests of Arg::default_value_ifs --- src/args/arg.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/args/arg.rs b/src/args/arg.rs index 0106b364439..1bdc40b1c8f 100644 --- a/src/args/arg.rs +++ b/src/args/arg.rs @@ -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" /// ]); @@ -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" /// ]); @@ -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" /// ]);