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 });