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 @@ -468,22 +468,20 @@ fn cooked_byte_string(mut input: Cursor) -> Result<Cursor, Reject> {
468468}
469469
470470fn delimiter_of_raw_string ( input : Cursor ) -> PResult < & str > {
471- let mut n = 0 ;
472471 for ( i, byte) in input. bytes ( ) . enumerate ( ) {
473472 match byte {
474473 b'"' => {
475- n = i;
476- break ;
474+ if i > 255 {
475+ // https://github.com/rust-lang/rust/pull/95251
476+ return Err ( Reject ) ;
477+ }
478+ return Ok ( ( input. advance ( i + 1 ) , & input. rest [ ..i] ) ) ;
477479 }
478480 b'#' => { }
479- _ => return Err ( Reject ) ,
481+ _ => break ,
480482 }
481483 }
482- if n > 255 {
483- // https://github.com/rust-lang/rust/pull/95251
484- return Err ( Reject ) ;
485- }
486- Ok ( ( input. advance ( n + 1 ) , & input. rest [ ..n] ) )
484+ Err ( Reject )
487485}
488486
489487fn raw_byte_string ( input : Cursor ) -> Result < Cursor , Reject > {
You can’t perform that action at this time.
0 commit comments