From 502dd7882803134f8ecdab11371c463882f2c05e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 17 Aug 2021 20:53:10 -0500 Subject: [PATCH] fix(derive): Don't produce warnings I did some digging to root cause this but gave up and suppressed it, like others. Warnings like this also come with a cost of code-gen complexity. Fixes #2712 --- clap_derive/src/derives/subcommand.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clap_derive/src/derives/subcommand.rs b/clap_derive/src/derives/subcommand.rs index af0f7854..fee4b039 100644 --- a/clap_derive/src/derives/subcommand.rs +++ b/clap_derive/src/derives/subcommand.rs @@ -93,7 +93,7 @@ fn gen_from_arg_matches_for_enum(name: &Ident, attrs: &[Attribute], e: &DataEnum let update_from_arg_matches = gen_update_from_arg_matches(name, &e.variants, &attrs); quote! { - #[allow(dead_code, unreachable_code, unused_variables)] + #[allow(dead_code, unreachable_code, unused_variables, unused_braces)] #[allow( clippy::style, clippy::complexity,