File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -801,25 +801,23 @@ pub(crate) mod parsing {
801
801
let mut params = Punctuated :: new ( ) ;
802
802
loop {
803
803
let lookahead = input. lookahead1 ( ) ;
804
- let capture = if lookahead. peek ( Lifetime ) {
805
- input. parse ( ) . map ( CapturedParam :: Lifetime )
804
+ params . push_value ( if lookahead. peek ( Lifetime ) {
805
+ input. parse ( ) . map ( CapturedParam :: Lifetime ) ?
806
806
} else if lookahead. peek ( Ident ) {
807
- input. parse ( ) . map ( CapturedParam :: Ident )
807
+ input. parse ( ) . map ( CapturedParam :: Ident ) ?
808
808
} else if lookahead. peek ( Token ! [ >] ) {
809
809
break ;
810
810
} else {
811
811
return Err ( lookahead. error ( ) ) ;
812
- } ?;
813
- params. push_value ( capture) ;
812
+ } ) ;
814
813
let lookahead = input. lookahead1 ( ) ;
815
- let comma = if lookahead. peek ( Token ! [ , ] ) {
816
- input. parse :: < Token ! [ , ] > ( )
814
+ params . push_punct ( if lookahead. peek ( Token ! [ , ] ) {
815
+ input. parse :: < Token ! [ , ] > ( ) ?
817
816
} else if lookahead. peek ( Token ! [ >] ) {
818
817
break ;
819
818
} else {
820
819
return Err ( lookahead. error ( ) ) ;
821
- } ?;
822
- params. push_punct ( comma) ;
820
+ } ) ;
823
821
}
824
822
let gt_token: Token ! [ >] = input. parse ( ) ?;
825
823
return if allow_precise_capture {
You can’t perform that action at this time.
0 commit comments