]>
git.proxmox.com Git - rustc.git/blob - vendor/clap/examples/cargo-example.rs
2 let cmd
= clap
::Command
::new("cargo")
4 .subcommand_required(true)
6 clap
::command
!("example").arg(
7 clap
::arg
!(--"manifest-path" <PATH
>)
9 .value_parser(clap
::value_parser
!(std
::path
::PathBuf
)),
12 let matches
= cmd
.get_matches();
13 let matches
= match matches
.subcommand() {
14 Some(("example", matches
)) => matches
,
15 _
=> unreachable
!("clap should ensure we don't get here"),
17 let manifest_path
= matches
.get_one
::<std
::path
::PathBuf
>("manifest-path");
18 println
!("{:?}", manifest_path
);