diff options
Diffstat (limited to 'structopt/examples/flatten.rs')
-rw-r--r-- | structopt/examples/flatten.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/structopt/examples/flatten.rs b/structopt/examples/flatten.rs deleted file mode 100644 index d51647f..0000000 --- a/structopt/examples/flatten.rs +++ /dev/null @@ -1,29 +0,0 @@ -//! How to use flattening. - -use structopt::StructOpt; - -#[derive(StructOpt, Debug)] -struct Cmdline { - /// switch verbosity on - #[structopt(short)] - verbose: bool, - - #[structopt(flatten)] - daemon_opts: DaemonOpts, -} - -#[derive(StructOpt, Debug)] -struct DaemonOpts { - /// daemon user - #[structopt(short)] - user: String, - - /// daemon group - #[structopt(short)] - group: String, -} - -fn main() { - let opt = Cmdline::from_args(); - println!("{:?}", opt); -} |