Fix unchecked.

Do not duplicate data size checking.
This commit is contained in:
Stephen Chung
2021-06-12 10:26:50 +08:00
parent f9dcfeb1ad
commit 68ea8c27fd
6 changed files with 80 additions and 88 deletions

View File

@@ -1095,7 +1095,7 @@ pub fn parse_string_literal(
match next_char {
// \r - ignore if followed by \n
'\r' if stream.peek_next().map(|ch| ch == '\n').unwrap_or(false) => {}
'\r' if stream.peek_next().map(|ch| ch == '\n').unwrap_or(false) => (),
// \...
'\\' if !verbatim && escape.is_empty() => {
escape.push('\\');