Skip to content

Commit 2c2a98f

Browse files
committed
Parse raw string delimiter without utf-8 decode
1 parent 01e74f7 commit 2c2a98f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/parse.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,13 @@ fn cooked_byte_string(mut input: Cursor) -> Result<Cursor, Reject> {
480480

481481
fn delimiter_of_raw_string(input: Cursor) -> PResult<&str> {
482482
let mut n = 0;
483-
for (i, ch) in input.char_indices() {
484-
match ch {
485-
'"' => {
483+
for (i, byte) in input.bytes().enumerate() {
484+
match byte {
485+
b'"' => {
486486
n = i;
487487
break;
488488
}
489-
'#' => {}
489+
b'#' => {}
490490
_ => return Err(Reject),
491491
}
492492
}

0 commit comments

Comments
 (0)