Skip to content

Commit

Permalink
Merge pull request #1474 from dtolnay/bytestrspaces
Browse files Browse the repository at this point in the history
Stricter parsing of string_continue escape in cooked byte string literal
  • Loading branch information
dtolnay committed Jun 24, 2023
2 parents 0828793 + fef64da commit a5f92e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lit.rs
Expand Up @@ -1273,8 +1273,7 @@ mod value {
b'"' => b'"',
b'\r' | b'\n' => loop {
let byte = byte(v, 0);
let ch = char::from_u32(u32::from(byte)).unwrap();
if ch.is_whitespace() {
if matches!(byte, b' ' | b'\t' | b'\n' | b'\r') {
v = &v[1..];
} else {
continue 'outer;
Expand Down

0 comments on commit a5f92e1

Please sign in to comment.