Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/token_ext.rs')
-rw-r--r--crates/syntax/src/ast/token_ext.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/syntax/src/ast/token_ext.rs b/crates/syntax/src/ast/token_ext.rs
index 4afdda78a0..742c452616 100644
--- a/crates/syntax/src/ast/token_ext.rs
+++ b/crates/syntax/src/ast/token_ext.rs
@@ -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),