clap/clap_derive/examples/no_version.rs
2020-01-18 17:40:07 +05:30

16 lines
279 B
Rust

//! How to completely remove version.
use clap::{AppSettings, Clap};
#[derive(Clap, Debug)]
#[clap(
name = "no_version",
no_version,
global_setting = AppSettings::DisableVersion
)]
struct Opt {}
fn main() {
let opt = Opt::parse();
println!("{:?}", opt);
}