mirror of https://github.com/astral-sh/ruff
Update compiler/parser/src/fstring.rs
Co-authored-by: Zgarbul Andrey <zgarbul.andrey@gmail.com>
This commit is contained in:
parent
7e8f683808
commit
b707f53f23
|
|
@ -207,14 +207,12 @@ impl<'a> FStringParser<'a> {
|
||||||
'"' | '\'' => {
|
'"' | '\'' => {
|
||||||
expression.push(ch);
|
expression.push(ch);
|
||||||
loop {
|
loop {
|
||||||
match self.next_char() {
|
let Some(c) = self.next_char() else {
|
||||||
Some(c) => {
|
return Err(UnterminatedString);
|
||||||
expression.push(c);
|
};
|
||||||
if c == ch {
|
expression.push(c);
|
||||||
break;
|
if c == ch {
|
||||||
}
|
break;
|
||||||
}
|
|
||||||
None => return Err(UnterminatedString),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue