From fa26d40a18c177e7048b1cbe19783e95ed9a0747 Mon Sep 17 00:00:00 2001 From: Marco A L Barbosa Date: Wed, 22 Feb 2017 11:25:10 -0300 Subject: [PATCH 1/2] Fix missing line before code block --- src/app/settings.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/settings.rs b/src/app/settings.rs index a3f879bf..a6400c1f 100644 --- a/src/app/settings.rs +++ b/src/app/settings.rs @@ -571,6 +571,7 @@ pub enum AppSettings { /// ``` /// Now doing the same thing, but *not* using any subcommands will result in the value not being /// propagated down. + /// /// ```rust /// # use clap::{App, Arg, AppSettings}; /// let m = App::new("myprog") From 6bf94606c2dc8c64ed3c525d79dc650c2575ba1c Mon Sep 17 00:00:00 2001 From: Kevin K Date: Wed, 22 Feb 2017 16:36:46 -0500 Subject: [PATCH 2/2] test: fixes failing doc test --- src/app/settings.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/settings.rs b/src/app/settings.rs index a6400c1f..ae71a0c1 100644 --- a/src/app/settings.rs +++ b/src/app/settings.rs @@ -573,10 +573,11 @@ pub enum AppSettings { /// propagated down. /// /// ```rust - /// # use clap::{App, Arg, AppSettings}; + /// # use clap::{App, Arg, AppSettings, SubCommand}; /// let m = App::new("myprog") /// .setting(AppSettings::PropagateGlobalValuesDown) - /// .global_arg(Arg::from_usage(" 'command to run'")) + /// .arg(Arg::from_usage("[cmd] 'command to run'") + /// .global(true)) /// .subcommand(SubCommand::with_name("foo")) /// .get_matches_from(vec!["myprog", "set"]); ///