mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 18:26:19 +00:00
Bump rustc-literal-escaper
This commit is contained in:
parent
30333a637c
commit
9f3adc540b
3 changed files with 6 additions and 12 deletions
|
|
@ -309,8 +309,8 @@ impl ast::CString {
|
|||
let mut prev_end = 0;
|
||||
let mut has_error = None;
|
||||
let extend_unit = |buf: &mut Vec<u8>, unit: MixedUnit| match unit {
|
||||
MixedUnit::Char(c) => buf.extend(c.encode_utf8(&mut [0; 4]).as_bytes()),
|
||||
MixedUnit::HighByte(b) => buf.push(b),
|
||||
MixedUnit::Char(c) => buf.extend(c.get().encode_utf8(&mut [0; 4]).as_bytes()),
|
||||
MixedUnit::HighByte(b) => buf.push(b.get()),
|
||||
};
|
||||
unescape_c_str(text, |char_range, unescaped| match (unescaped, buf.capacity() == 0) {
|
||||
(Ok(u), false) => extend_unit(&mut buf, u),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue