Skip to content

Commit a27ede8

Browse files
committed
Fix problem with format string tokenization
Fixed by just not handling closing curlybrace escaping.
1 parent 07060b3 commit a27ede8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

crates/ra_syntax/src/ast/tokens.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,14 +418,9 @@ pub trait HasFormatSpecifier: AstToken {
418418

419419
let mut cloned = chars.clone().take(2);
420420
let first = cloned.next().and_then(|next| next.1.as_ref().ok()).copied();
421-
let second = cloned.next().and_then(|next| next.1.as_ref().ok()).copied();
422421
if first != Some('}') {
423422
continue;
424423
}
425-
if second == Some('}') {
426-
// Escaped format end specifier, `}}`
427-
continue;
428-
}
429424
skip_char_and_emit(&mut chars, FormatSpecifier::Close, &mut callback);
430425
}
431426
_ => {

0 commit comments

Comments
 (0)