summaryrefslogtreecommitdiffstats
path: root/vendor/clap/examples/tutorial_builder/05_01_assert.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/clap/examples/tutorial_builder/05_01_assert.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/vendor/clap/examples/tutorial_builder/05_01_assert.rs b/vendor/clap/examples/tutorial_builder/05_01_assert.rs
index d6f19ffe5..4b9254230 100644
--- a/vendor/clap/examples/tutorial_builder/05_01_assert.rs
+++ b/vendor/clap/examples/tutorial_builder/05_01_assert.rs
@@ -1,5 +1,3 @@
-// Note: this requires the `cargo` feature
-
use clap::{arg, command, value_parser};
fn main() {
@@ -13,14 +11,15 @@ fn main() {
}
fn cmd() -> clap::Command<'static> {
- command!().arg(
- arg!(<PORT>)
- .help("Network port to use")
- .value_parser(value_parser!(usize)),
- )
+ command!() // requires `cargo` feature
+ .arg(
+ arg!(<PORT>)
+ .help("Network port to use")
+ .value_parser(value_parser!(usize)),
+ )
}
#[test]
-fn verify_app() {
+fn verify_cmd() {
cmd().debug_assert();
}