Skip to content

Commit af4a43d

Browse files
harupyburrbull
andauthored
Update compiler/parser/src/fstring.rs
Co-authored-by: Zgarbul Andrey <zgarbul.andrey@gmail.com>
1 parent 7b20223 commit af4a43d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

compiler/parser/src/fstring.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,12 @@ impl<'a> FStringParser<'a> {
207207
'"' | '\'' => {
208208
expression.push(ch);
209209
loop {
210-
match self.next_char() {
211-
Some(c) => {
212-
expression.push(c);
213-
if c == ch {
214-
break;
215-
}
216-
}
217-
None => return Err(UnterminatedString),
210+
let Some(c) = self.next_char() else {
211+
return Err(UnterminatedString);
212+
};
213+
expression.push(c);
214+
if c == ch {
215+
break;
218216
}
219217
}
220218
}

0 commit comments

Comments
 (0)