Remove explicit \n
and \t
handling in unescape_str_common
.
The fallback `_` case works for these chars, no need to treat them specially.
This commit is contained in:
parent
08b8ba0a32
commit
f883762970
1 changed files with 0 additions and 2 deletions
|
@ -351,8 +351,6 @@ where
|
|||
_ => scan_escape::<T>(&mut chars, mode),
|
||||
}
|
||||
}
|
||||
'\n' => Ok(b'\n'.into()),
|
||||
'\t' => Ok(b'\t'.into()),
|
||||
'"' => Err(EscapeError::EscapeOnlyChar),
|
||||
'\r' => Err(EscapeError::BareCarriageReturn),
|
||||
_ => ascii_check(c, mode.characters_should_be_ascii()).map(Into::into),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue