From 631cd5845e8de329d0e227aaa707d7ea228b8f8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:29 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/clap/examples/git-derive.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'vendor/clap/examples/git-derive.rs') diff --git a/vendor/clap/examples/git-derive.rs b/vendor/clap/examples/git-derive.rs index 519982d1b..ad82e0cea 100644 --- a/vendor/clap/examples/git-derive.rs +++ b/vendor/clap/examples/git-derive.rs @@ -53,7 +53,7 @@ enum Commands { #[arg(required = true)] path: Vec, }, - Stash(Stash), + Stash(StashArgs), #[command(external_subcommand)] External(Vec), } @@ -76,23 +76,23 @@ impl std::fmt::Display for ColorWhen { #[derive(Debug, Args)] #[command(args_conflicts_with_subcommands = true)] -struct Stash { +struct StashArgs { #[command(subcommand)] command: Option, #[command(flatten)] - push: StashPush, + push: StashPushArgs, } #[derive(Debug, Subcommand)] enum StashCommands { - Push(StashPush), + Push(StashPushArgs), Pop { stash: Option }, Apply { stash: Option }, } #[derive(Debug, Args)] -struct StashPush { +struct StashPushArgs { #[arg(short, long)] message: Option, } @@ -102,7 +102,7 @@ fn main() { match args.command { Commands::Clone { remote } => { - println!("Cloning {}", remote); + println!("Cloning {remote}"); } Commands::Diff { mut base, @@ -136,22 +136,22 @@ fn main() { ); } Commands::Push { remote } => { - println!("Pushing to {}", remote); + println!("Pushing to {remote}"); } Commands::Add { path } => { - println!("Adding {:?}", path); + println!("Adding {path:?}"); } Commands::Stash(stash) => { let stash_cmd = stash.command.unwrap_or(StashCommands::Push(stash.push)); match stash_cmd { StashCommands::Push(push) => { - println!("Pushing {:?}", push); + println!("Pushing {push:?}"); } StashCommands::Pop { stash } => { - println!("Popping {:?}", stash); + println!("Popping {stash:?}"); } StashCommands::Apply { stash } => { - println!("Applying {:?}", stash); + println!("Applying {stash:?}"); } } } -- cgit v1.2.3