Matthew Maurer | 32e7669 | 2020-06-02 11:15:15 -0700 | [diff] [blame] | 1 | //! How to completely remove version. |
2 | |||||
3 | use structopt::clap::AppSettings; | ||||
4 | use structopt::StructOpt; | ||||
5 | |||||
6 | #[derive(StructOpt, Debug)] | ||||
7 | #[structopt( | ||||
8 | name = "no_version", | ||||
9 | no_version, | ||||
10 | global_settings = &[AppSettings::DisableVersion] | ||||
11 | )] | ||||
12 | struct Opt {} | ||||
13 | |||||
14 | fn main() { | ||||
15 | let opt = Opt::from_args(); | ||||
16 | println!("{:?}", opt); | ||||
17 | } |