File tree 2 files changed +3
-3
lines changed
ruff_python_parser/src/parser 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1580,7 +1580,7 @@ impl<'a> IntoIterator for &'a mut FStringElements {
1580
1580
}
1581
1581
1582
1582
impl Deref for FStringElements {
1583
- type Target = Vec < FStringElement > ;
1583
+ type Target = [ FStringElement ] ;
1584
1584
1585
1585
fn deref ( & self ) -> & Self :: Target {
1586
1586
& self . 0
Original file line number Diff line number Diff line change @@ -1298,7 +1298,7 @@ impl<'src> Parser<'src> {
1298
1298
///
1299
1299
/// If the parser isn't positioned at a `{` or `FStringMiddle` token.
1300
1300
fn parse_fstring_elements ( & mut self ) -> FStringElements {
1301
- let mut elements = FStringElements :: default ( ) ;
1301
+ let mut elements = vec ! [ ] ;
1302
1302
1303
1303
self . parse_list ( RecoveryContextKind :: FStringElements , |parser| {
1304
1304
let element = match parser. current_token_kind ( ) {
@@ -1348,7 +1348,7 @@ impl<'src> Parser<'src> {
1348
1348
elements. push ( element) ;
1349
1349
} ) ;
1350
1350
1351
- elements
1351
+ FStringElements :: from ( elements)
1352
1352
}
1353
1353
1354
1354
/// Parses a f-string expression element.
You can’t perform that action at this time.
0 commit comments