@@ -520,12 +520,12 @@ WithItems: Vec<ast::Withitem> = {
520520 <items:TestAs<ExprOrWithitemsGoal>> =>? items.try_into(),
521521 <first:TestAs<ExprOrWithitemsGoal>> "as" <vars:Expression> =>? {
522522 let optional_vars = Some(Box::new(set_context(vars, ast::ExprContext::Store)));
523- let context_expr = Box::new( first.try_into()?) ;
523+ let context_expr = first.try_into()?;
524524 Ok(vec![ast::Withitem { context_expr, optional_vars }])
525525 },
526526 <first:TestAs<ExprOrWithitemsGoal>> <n:("as" Expression)?> "," <mut items:OneOrMore<WithItem>> =>? {
527527 let optional_vars = n.map(|val| Box::new(set_context(val.1, ast::ExprContext::Store)));
528- let context_expr = Box::new( first.try_into()?) ;
528+ let context_expr = first.try_into()?;
529529 items.insert(0, ast::Withitem { context_expr, optional_vars });
530530 Ok(items)
531531 }
@@ -534,7 +534,6 @@ WithItems: Vec<ast::Withitem> = {
534534WithItem: ast::Withitem = {
535535 <context_expr:Test> <n:("as" Expression)?> => {
536536 let optional_vars = n.map(|val| Box::new(set_context(val.1, ast::ExprContext::Store)));
537- let context_expr = Box::new(context_expr);
538537 ast::Withitem { context_expr, optional_vars }
539538 },
540539};
@@ -1280,8 +1279,8 @@ SingleForComprehension: ast::Comprehension = {
12801279 <location:@L> <is_async:"async"?> "for" <target:ExpressionList> "in" <iter:OrTest> <ifs:ComprehensionIf*> <end_location:@R> => {
12811280 let is_async = is_async.is_some();
12821281 ast::Comprehension {
1283- target: Box::new( set_context(target, ast::ExprContext::Store) ),
1284- iter: Box::new(iter) ,
1282+ target: set_context(target, ast::ExprContext::Store),
1283+ iter,
12851284 ifs,
12861285 is_async: if is_async { 1 } else { 0 },
12871286 }
0 commit comments