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
12
Cargo.lock
generated
12
Cargo.lock
generated
|
|
@ -1505,7 +1505,7 @@ dependencies = [
|
|||
"edition",
|
||||
"expect-test",
|
||||
"ra-ap-rustc_lexer",
|
||||
"rustc-literal-escaper 0.0.4",
|
||||
"rustc-literal-escaper",
|
||||
"stdx",
|
||||
"tracing",
|
||||
]
|
||||
|
|
@ -1814,7 +1814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "18d2c4b48fa26e031b1cca0c8ca7433770f5e35e33da56da8636dae2cd45d4e1"
|
||||
dependencies = [
|
||||
"ra-ap-rustc_lexer",
|
||||
"rustc-literal-escaper 0.0.5",
|
||||
"rustc-literal-escaper",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1966,12 +1966,6 @@ version = "2.1.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-literal-escaper"
|
||||
version = "0.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab03008eb631b703dd16978282ae36c73282e7922fe101a4bd072a40ecea7b8b"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-literal-escaper"
|
||||
version = "0.0.5"
|
||||
|
|
@ -2265,7 +2259,7 @@ dependencies = [
|
|||
"rayon",
|
||||
"rowan",
|
||||
"rustc-hash 2.1.1",
|
||||
"rustc-literal-escaper 0.0.4",
|
||||
"rustc-literal-escaper",
|
||||
"rustc_apfloat",
|
||||
"smol_str",
|
||||
"stdx",
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ serde = { version = "1.0.219" }
|
|||
serde_derive = { version = "1.0.219" }
|
||||
serde_json = "1.0.140"
|
||||
rustc-hash = "2.1.1"
|
||||
rustc-literal-escaper = "0.0.4"
|
||||
rustc-literal-escaper = "0.0.5"
|
||||
smallvec = { version = "1.15.1", features = [
|
||||
"const_new",
|
||||
"union",
|
||||
|
|
|
|||
|
|
@ -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