Fixed doc tests

This commit is contained in:
Kevin K 2015-03-15 17:39:36 -04:00
parent 65a8a4f045
commit e05ece7696
3 changed files with 5 additions and 5 deletions

View file

@ -1,7 +1,7 @@
[package]
name = "clap"
version = "0.4.0"
version = "0.4.1"
authors = ["Kevin K. <kbknapp@gmail.com>"]
exclude = ["docs/*"]
description = "A Command Line Argument Parser written in Rust"

View file

@ -172,7 +172,7 @@ impl ArgMatches {
///
/// ```no_run
/// # use clap::{App, Arg, SubCommand};
/// # let matches = App::new("myapp").subcommand(SubCommand::new("test")).get_matches();
/// # let app_matches = App::new("myapp").subcommand(SubCommand::new("test")).get_matches();
/// if let Some(matches) = app_matches.subcommand_matches("test") {
/// // Use matches as normal
/// }
@ -192,8 +192,8 @@ impl ArgMatches {
///
/// ```no_run
/// # use clap::{App, Arg, SubCommand};
/// # let matches = App::new("myapp").subcommand(SubCommand::new("test")).get_matches();
/// match app_matches.subcommand_() {
/// # let app_matches = App::new("myapp").subcommand(SubCommand::new("test")).get_matches();
/// match app_matches.subcommand_name() {
/// Some("test") => {}, // test was used
/// Some("config") => {}, // config was used
/// _ => {}, // Either no subcommand or one not tested for...

View file

@ -13,7 +13,7 @@ use argmatches::ArgMatches;
/// ```no_run
/// # use clap::{App, Arg, SubCommand};
/// # let matches = App::new("myprog")
/// # .SubCommand(
/// # .subcommand(
/// SubCommand::new("conifg")
/// .about("Used for configuration")
/// .arg(Arg::new("config_file")