clap/tests/derive_ui/clap_empty_attr.rs

17 lines
214 B
Rust
Raw Normal View History

use clap::Parser;
2020-01-20 21:19:37 +00:00
#[derive(Parser, Debug)]
#[command]
2020-01-20 21:19:37 +00:00
struct Opt {}
#[derive(Parser, Debug)]
2020-01-20 21:19:37 +00:00
struct Opt1 {
#[arg = "short"]
foo: u32,
2020-01-20 21:19:37 +00:00
}
fn main() {
let opt = Opt::parse();
println!("{opt:?}");
2020-01-20 21:19:37 +00:00
}