mirror of
https://github.com/Noratrieb/badargs.git
synced 2026-01-14 19:55:08 +01:00
started parsing
This commit is contained in:
parent
148574ed6e
commit
cb734a708d
5 changed files with 86 additions and 63 deletions
|
|
@ -1,13 +1,13 @@
|
|||
use badargs::arg;
|
||||
|
||||
arg!(OutFile: "output", "o" -> Option<String>);
|
||||
arg!(Force: "force", "f" -> bool);
|
||||
arg!(OutFile: "output", 'o' -> Option<String>);
|
||||
arg!(Force: "force", 'f' -> bool);
|
||||
arg!(OLevel: "optimize" -> usize);
|
||||
|
||||
fn main() {
|
||||
let args = badargs::badargs::<(OutFile, (Force, OLevel))>().unwrap();
|
||||
|
||||
let _outfile = args.get::<OutFile>();
|
||||
let _force = args.get::<Force>();
|
||||
let _o_level = args.get::<OLevel>();
|
||||
let outfile = args.get::<OutFile>();
|
||||
let force = args.get::<Force>();
|
||||
let o_level = args.get::<OLevel>();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue