@@ -182,7 +182,8 @@ impl<'a> Signature<'a> {
182182 }
183183
184184 if let Some ( output) = self . output {
185- if let Some ( wrapped_self) = Self :: wrap_self ( output, morphed_ty, real_self, & proxy_real) ? {
185+ if let Some ( wrapped_self) = Self :: wrap_self ( output, morphed_ty, real_self, & proxy_real) ?
186+ {
186187 proxy_real = wrapped_self;
187188 }
188189 }
@@ -275,7 +276,7 @@ impl<'a> Signature<'a> {
275276 syn:: Type :: Path ( output) => output,
276277 syn:: Type :: Tuple ( tuple) => {
277278 return Self :: wrap_self_tuple ( block, tuple, morphed_ty, real_self) ;
278- } ,
279+ }
279280 output => return Err ( unhandled_self_return ( output) ) ,
280281 } ;
281282
@@ -344,11 +345,13 @@ impl<'a> Signature<'a> {
344345 }
345346
346347 fn wrap_self_tuple (
347- block : & TokenStream ,
348- tuple : & syn:: TypeTuple ,
348+ block : & TokenStream ,
349+ tuple : & syn:: TypeTuple ,
349350 morphed_ty : & syn:: TypePath ,
350- real_self : SelfType ) -> darling:: Result < Option < TokenStream > > {
351- let elements = tuple. elems
351+ real_self : SelfType ,
352+ ) -> darling:: Result < Option < TokenStream > > {
353+ let elements = tuple
354+ . elems
352355 . iter ( )
353356 . enumerate ( )
354357 . map ( |e| {
@@ -361,10 +364,10 @@ impl<'a> Signature<'a> {
361364 Ok ( wrapped. unwrap_or ( tuple_index) )
362365 } )
363366 . collect :: < darling:: Result < Vec < TokenStream > > > ( ) ?;
364-
365- Ok ( Some ( quote ! { {
367+
368+ Ok ( Some ( quote ! { {
366369 let tuple = #block;
367-
370+
368371 ( # ( #elements) , * )
369372 } } ) )
370373 }
@@ -464,11 +467,8 @@ fn add_lifetime(t: &mut Type, new_lifetime: &Lifetime) {
464467 ..
465468 } ) = segments. last_mut ( )
466469 {
467- if let Some ( first_arg) = args. args . first_mut ( ) {
468- match first_arg {
469- GenericArgument :: Type ( t) => add_lifetime ( t, new_lifetime) ,
470- _ => { }
471- }
470+ if let Some ( GenericArgument :: Type ( t) ) = args. args . first_mut ( ) {
471+ add_lifetime ( t, new_lifetime)
472472 }
473473 } ;
474474 }
@@ -522,10 +522,8 @@ fn ang_generic_contains_self(args: &syn::AngleBracketedGenericArguments, path: &
522522 if contains_self ( & assoc. ty , path) {
523523 return true ;
524524 }
525- // TODO: use let-else once we bump MSRV to 1.65.0
526- let args = match & assoc. generics {
527- Some ( args) => args,
528- None => return false ,
525+ let Some ( args) = & assoc. generics else {
526+ return false ;
529527 } ;
530528 ang_generic_contains_self ( args, path)
531529 }
0 commit comments