From 9a4b9812eeba1a396701597af3e74b0abdf73d46 Mon Sep 17 00:00:00 2001 From: CreepySkeleton Date: Fri, 12 Jun 2020 12:11:49 +0300 Subject: [PATCH] Remove unnecessary braces --- structopt-derive/src/lib.rs | 4 ++-- structopt-derive/src/spanned.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/structopt-derive/src/lib.rs b/structopt-derive/src/lib.rs index 5e494681..820a4c8e 100644 --- a/structopt-derive/src/lib.rs +++ b/structopt-derive/src/lib.rs @@ -648,10 +648,10 @@ fn gen_from_subcommand( } (external, None) => { - ::std::option::Option::Some(#name::#var_name({ + ::std::option::Option::Some(#name::#var_name( ::std::iter::once(#str_ty::from(external)) .collect::<::std::vec::Vec<_>>() - })) + )) } } }, diff --git a/structopt-derive/src/spanned.rs b/structopt-derive/src/spanned.rs index 19dbe476..1c02a825 100644 --- a/structopt-derive/src/spanned.rs +++ b/structopt-derive/src/spanned.rs @@ -88,7 +88,7 @@ impl ToTokens for Sp { // this is the simplest way out of correct ones to change span on // arbitrary token tree I can come up with let tt = self.val.to_token_stream().into_iter().map(|mut tt| { - tt.set_span(self.span.clone()); + tt.set_span(self.span); tt });