mirror of
https://github.com/clap-rs/clap
synced 2024-09-21 14:52:00 +00:00
docs(examples): Don't crash when subcommand isn't provided
This commit is contained in:
parent
0a4a2dd36b
commit
74d41b6f52
1 changed files with 1 additions and 0 deletions
|
@ -29,6 +29,7 @@ fn main() {
|
|||
|
||||
match matches.subcommand_name() {
|
||||
Some("test") => println!("The 'test' subcommand was used"),
|
||||
None => {}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue