File tree 1 file changed +7
-9
lines changed
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> {
468
468
}
469
469
470
470
fn delimiter_of_raw_string ( input : Cursor ) -> PResult < & str > {
471
- let mut n = 0 ;
472
471
for ( i, byte) in input. bytes ( ) . enumerate ( ) {
473
472
match byte {
474
473
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] ) ) ;
477
479
}
478
480
b'#' => { }
479
- _ => return Err ( Reject ) ,
481
+ _ => break ,
480
482
}
481
483
}
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 )
487
485
}
488
486
489
487
fn raw_byte_string ( input : Cursor ) -> Result < Cursor , Reject > {
You can’t perform that action at this time.
0 commit comments