Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/syntax_highlighting/escape.rs')
-rw-r--r--crates/ide/src/syntax_highlighting/escape.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide/src/syntax_highlighting/escape.rs b/crates/ide/src/syntax_highlighting/escape.rs
index 5913ca5e45..0439e509d2 100644
--- a/crates/ide/src/syntax_highlighting/escape.rs
+++ b/crates/ide/src/syntax_highlighting/escape.rs
@@ -25,7 +25,7 @@ pub(super) fn highlight_escape_string<T: IsString>(
}
pub(super) fn highlight_escape_char(stack: &mut Highlights, char: &Char, start: TextSize) {
- if char.value().is_none() {
+ if char.value().is_err() {
// We do not emit invalid escapes highlighting here. The lexer would likely be in a bad
// state and this token contains junks, since `'` is not a reliable delimiter (consider
// lifetimes). Nonetheless, parser errors should already be emitted.
@@ -48,7 +48,7 @@ pub(super) fn highlight_escape_char(stack: &mut Highlights, char: &Char, start:
}
pub(super) fn highlight_escape_byte(stack: &mut Highlights, byte: &Byte, start: TextSize) {
- if byte.value().is_none() {
+ if byte.value().is_err() {
// See `highlight_escape_char` for why no error highlighting here.
return;
}