Rename the unescaping functions.

`unescape_literal` becomes `unescape_unicode`, and `unescape_c_string`
becomes `unescape_mixed`. Because rfc3349 will mean that C string
literals will no longer be the only mixed utf8 literals.
This commit is contained in:
Nicholas Nethercote 2024-01-24 15:24:58 +11:00
parent 5e5aa6d556
commit 86f371ed59
9 changed files with 45 additions and 42 deletions

View file

@ -1056,7 +1056,7 @@ fn find_width_map_from_snippet(
fn unescape_string(string: &str) -> Option<string::String> {
let mut buf = string::String::new();
let mut ok = true;
unescape::unescape_literal(string, unescape::Mode::Str, &mut |_, unescaped_char| {
unescape::unescape_unicode(string, unescape::Mode::Str, &mut |_, unescaped_char| {
match unescaped_char {
Ok(c) => buf.push(c),
Err(_) => ok = false,