From 03ee714b08fa2c4353b3802c9810789992f3a616 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Mon, 27 Feb 2023 11:45:41 +0200 Subject: [PATCH] fix(derive): avoid arg reassignment in `gen_augment` --- clap_derive/src/derives/args.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/clap_derive/src/derives/args.rs b/clap_derive/src/derives/args.rs index b5d51bfca397..867adeccc676 100644 --- a/clap_derive/src/derives/args.rs +++ b/clap_derive/src/derives/args.rs @@ -341,16 +341,10 @@ pub fn gen_augment( #deprecations #[allow(deprecated)] - let arg = clap::Arg::new(#id) - #implicit_methods; - - let arg = arg - #explicit_methods; - - let arg = arg - #override_methods; - - arg + clap::Arg::new(#id) + #implicit_methods + #explicit_methods + #override_methods }); }) }