]> git.proxmox.com Git - rustc.git/blob - vendor/clap/examples/tutorial_builder/03_02_option.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / vendor / clap / examples / tutorial_builder / 03_02_option.rs
1 // Note: this requires the `cargo` feature
2
3 use clap::{arg, command};
4
5 fn main() {
6 let matches = command!()
7 .arg(arg!(-n --name <NAME>).required(false))
8 .get_matches();
9
10 println!("name: {:?}", matches.get_one::<String>("name"));
11 }