diff --git a/examples/nop-preprocessor.rs b/examples/nop-preprocessor.rs index d53d8745..69fb87f4 100644 --- a/examples/nop-preprocessor.rs +++ b/examples/nop-preprocessor.rs @@ -12,7 +12,7 @@ pub fn make_app() -> App<'static> { .about("A mdbook preprocessor which does precisely nothing") .subcommand( SubCommand::with_name("supports") - .arg(Arg::with_name("renderer").required(true)) + .arg(Arg::new("renderer").required(true)) .about("Check whether a renderer is supported by this preprocessor"), ) } diff --git a/src/cmd/init.rs b/src/cmd/init.rs index d777c081..b9e08872 100644 --- a/src/cmd/init.rs +++ b/src/cmd/init.rs @@ -19,14 +19,14 @@ pub fn make_subcommand<'help>() -> App<'help> { .arg_from_usage("--theme 'Copies the default theme into your source folder'") .arg_from_usage("--force 'Skips confirmation prompts'") .arg( - Arg::with_name("title") + Arg::new("title") .long("title") .takes_value(true) .help("Sets the book title") .required(false), ) .arg( - Arg::with_name("ignore") + Arg::new("ignore") .long("ignore") .takes_value(true) .possible_values(&["none", "git"]) diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index 0b46a1e5..fcc06b40 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -31,7 +31,7 @@ pub fn make_subcommand<'help>() -> App<'help> { (Defaults to the Current Directory when omitted)'", ) .arg( - Arg::with_name("hostname") + Arg::new("hostname") .short('n') .long("hostname") .takes_value(true) @@ -40,7 +40,7 @@ pub fn make_subcommand<'help>() -> App<'help> { .help("Hostname to listen on for HTTP connections"), ) .arg( - Arg::with_name("port") + Arg::new("port") .short('p') .long("port") .takes_value(true) diff --git a/src/cmd/test.rs b/src/cmd/test.rs index 50470793..ba7aa6c9 100644 --- a/src/cmd/test.rs +++ b/src/cmd/test.rs @@ -16,7 +16,7 @@ pub fn make_subcommand<'help>() -> App<'help> { "[dir] 'Root directory for the book{n}\ (Defaults to the Current Directory when omitted)'", ) - .arg(Arg::with_name("library-path") + .arg(Arg::new("library-path") .short('L') .long("library-path") .value_name("dir") diff --git a/src/main.rs b/src/main.rs index 36f0fc02..37c85c43 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,7 +81,7 @@ fn create_clap_app() -> App<'static> { SubCommand::with_name("completions") .about("Generate shell completions for your shell to stdout") .arg( - Arg::with_name("shell") + Arg::new("shell") .takes_value(true) .possible_values(Shell::possible_values()) .help("the shell to generate completions for")