File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ impl<'a> Tokenizer<'a> {
262
262
263
263
#[ inline]
264
264
pub fn next ( & mut self ) -> Result < Token < ' a > , ( ) > {
265
- next_token ( self ) . ok_or ( ( ) )
265
+ next_token ( self )
266
266
}
267
267
268
268
#[ inline]
@@ -401,9 +401,9 @@ pub struct SourceLocation {
401
401
}
402
402
403
403
404
- fn next_token < ' a > ( tokenizer : & mut Tokenizer < ' a > ) -> Option < Token < ' a > > {
404
+ fn next_token < ' a > ( tokenizer : & mut Tokenizer < ' a > ) -> Result < Token < ' a > , ( ) > {
405
405
if tokenizer. is_eof ( ) {
406
- return None
406
+ return Err ( ( ) )
407
407
}
408
408
let c = tokenizer. next_byte_unchecked ( ) ;
409
409
let token = match_byte ! { c,
@@ -564,7 +564,7 @@ fn next_token<'a>(tokenizer: &mut Tokenizer<'a>) -> Option<Token<'a>> {
564
564
}
565
565
} ,
566
566
} ;
567
- Some ( token)
567
+ Ok ( token)
568
568
}
569
569
570
570
You can’t perform that action at this time.
0 commit comments