File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
src/libsyntax/parse/lexer Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -477,15 +477,14 @@ impl<'a> StringReader<'a> {
477
477
478
478
pub fn nextnextch ( & self ) -> Option < char > {
479
479
let next_src_index = self . src_index ( self . next_pos ) ;
480
- if next_src_index >= self . end_src_index {
481
- return None ;
482
- }
483
- let next_next_src_index = next_src_index + char_at ( & self . src , next_src_index) . len_utf8 ( ) ;
484
- if next_next_src_index < self . end_src_index {
485
- Some ( char_at ( & self . src , next_next_src_index) )
486
- } else {
487
- None
480
+ if next_src_index < self . end_src_index {
481
+ let next_next_src_index =
482
+ next_src_index + char_at ( & self . src , next_src_index) . len_utf8 ( ) ;
483
+ if next_next_src_index < self . end_src_index {
484
+ return Some ( char_at ( & self . src , next_next_src_index) ) ;
485
+ }
488
486
}
487
+ None
489
488
}
490
489
491
490
pub fn nextnextch_is ( & self , c : char ) -> bool {
You can’t perform that action at this time.
0 commit comments