mirror of
https://github.com/clap-rs/clap
synced 2025-01-18 23:53:54 +00:00
docs(clap): fix failing doc tests
This commit is contained in:
parent
43955e8c48
commit
b67f2e537e
2 changed files with 1 additions and 2 deletions
|
@ -446,7 +446,7 @@ impl<'a, 'v, 'ab, 'u, 'ar> App<'a, 'v, 'ab, 'u, 'ar>{
|
|||
/// # let app = App::new("myprog")
|
||||
/// .subcommand(SubCommand::new("config")
|
||||
/// .about("Controls configuration features")
|
||||
/// .arg_from_usage("<config> 'Required configuration file to use'")))
|
||||
/// .arg_from_usage("<config> 'Required configuration file to use'"))
|
||||
/// // Additional subcommand configuration goes here, such as other arguments...
|
||||
/// # .get_matches();
|
||||
/// ```
|
||||
|
|
|
@ -196,7 +196,6 @@ impl<'n, 'l, 'h, 'b, 'p, 'r> Arg<'n, 'l, 'h, 'b, 'p, 'r> {
|
|||
/// // A required positional argument named "input"
|
||||
/// Arg::from_usage("<input> 'the input file to use'")
|
||||
/// ])
|
||||
/// #
|
||||
/// # .get_matches();
|
||||
pub fn from_usage(u: &'n str) -> Arg<'n, 'n, 'n, 'b, 'p, 'r> {
|
||||
assert!(u.len() > 0, "Arg::from_usage() requires a non-zero-length usage string but none was provided");
|
||||
|
|
Loading…
Reference in a new issue