mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-24 20:43:07 +00:00
fixed cli clap for latest version
This commit is contained in:
parent
fe014e8e93
commit
413b8522c1
1 changed files with 2 additions and 2 deletions
|
@ -19,8 +19,8 @@ fn main() {
|
|||
.version("0.1.0")
|
||||
.author("Hackerman Jones <hckrmnjones@hack.gov>")
|
||||
.about("Teaches argument parsing")
|
||||
.arg(arg!(--file <VALUE>).required(true).value_name("A cool file"))
|
||||
.arg(arg!(--num <VALUE>).required(false).value_name("Five less than your favorite number"))
|
||||
.arg(arg!(--file <VALUE>).short('f').required(true).value_name("A cool file"))
|
||||
.arg(arg!(--num <VALUE>).short('n').required(false).value_name("Five less than your favorite number"))
|
||||
.get_matches();
|
||||
|
||||
let myfile = matches.get_one::<String>("file").expect("required");
|
||||
|
|
Loading…
Reference in a new issue