File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -121,12 +121,11 @@ fn parse_expected(last_nonfollow_error: Option<usize>,
121121 ( false , line[ start + tag. len ( ) ..] . chars ( ) . take_while ( |c| * c == '^' ) . count ( ) )
122122 } ;
123123 let kind_start = start + tag. len ( ) + adjusts + ( follow as usize ) ;
124- let letters = line[ kind_start..] . chars ( ) ;
125- let kind = letters. skip_while ( |c| c. is_whitespace ( ) )
126- . take_while ( |c| !c. is_whitespace ( ) )
127- . collect :: < String > ( )
128- . parse :: < ErrorKind > ( )
129- . ok ( ) ;
124+ let kind = line[ kind_start..] . split_whitespace ( )
125+ . next ( )
126+ . expect ( "Encountered unexpected empty comment" )
127+ . parse :: < ErrorKind > ( )
128+ . ok ( ) ;
130129 let letters = line[ kind_start..] . chars ( ) ;
131130 let msg = letters. skip_while ( |c| c. is_whitespace ( ) )
132131 . skip_while ( |c| !c. is_whitespace ( ) )
You can’t perform that action at this time.
0 commit comments