diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/clap/examples/escaped-positional-derive.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/clap/examples/escaped-positional-derive.rs')
-rw-r--r-- | vendor/clap/examples/escaped-positional-derive.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/vendor/clap/examples/escaped-positional-derive.rs b/vendor/clap/examples/escaped-positional-derive.rs deleted file mode 100644 index 719b3d6..0000000 --- a/vendor/clap/examples/escaped-positional-derive.rs +++ /dev/null @@ -1,25 +0,0 @@ -use clap::Parser; - -#[derive(Parser)] // requires `derive` feature -#[command(author, version, about, long_about = None)] -struct Cli { - #[arg(short = 'f')] - eff: bool, - - #[arg(short = 'p', value_name = "PEAR")] - pea: Option<String>, - - #[arg(last = true)] - slop: Vec<String>, -} - -fn main() { - let args = Cli::parse(); - - // This is what will happen with `myprog -f -p=bob -- sloppy slop slop`... - println!("-f used: {:?}", args.eff); // -f used: true - println!("-p's value: {:?}", args.pea); // -p's value: Some("bob") - println!("'slops' values: {:?}", args.slop); // 'slops' values: Some(["sloppy", "slop", "slop"]) - - // Continued program logic goes here... -} |