]>
git.proxmox.com Git - rustc.git/blob - vendor/structopt/tests/ui/subcommand_and_parse.rs
1 // Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu>
3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6 // option. This file may not be copied, modified, or distributed
7 // except according to those terms.
9 use structopt
::StructOpt
;
11 #[derive(StructOpt, Debug)]
12 #[structopt(name = "make-cookie")]
17 #[structopt(subcommand, parse(from_occurrences))]
21 #[derive(StructOpt, Debug)]
23 #[structopt(name = "pound")]
24 /// Pound acorns into flour for cookie dough.
25 Pound { acorns: u32 }
,
34 let opt
= MakeCookie
::from_args();
35 println
!("{:?}", opt
);