From ac8526688a4c85818a0250a03313fa95f1cd1311 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 18 Jan 2022 16:21:53 -0600 Subject: [PATCH] refactor: Move from deprecated empty_values --- src/cmd/serve.rs | 4 ++-- src/cmd/test.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index 5b3ef696..6328e625 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -36,7 +36,7 @@ pub fn make_subcommand<'help>() -> App<'help> { .long("hostname") .takes_value(true) .default_value("localhost") - .empty_values(false) + .forbid_empty_values(true) .help("Hostname to listen on for HTTP connections"), ) .arg( @@ -45,7 +45,7 @@ pub fn make_subcommand<'help>() -> App<'help> { .long("port") .takes_value(true) .default_value("3000") - .empty_values(false) + .forbid_empty_values(true) .help("Port to use for HTTP connections"), ) .arg_from_usage("-o, --open 'Opens the book server in a web browser'") diff --git a/src/cmd/test.rs b/src/cmd/test.rs index b3e27325..6c6a1eb9 100644 --- a/src/cmd/test.rs +++ b/src/cmd/test.rs @@ -24,7 +24,7 @@ pub fn make_subcommand<'help>() -> App<'help> { .use_delimiter(true) .require_delimiter(true) .multiple(true) - .empty_values(false) + .forbid_empty_values(true) .help("A comma-separated list of directories to add to {n}the crate search path when building tests")) }