directly return after folding the special case of list comprehension
This commit is contained in:
parent
7b93720236
commit
8f0c335422
|
@ -20,7 +20,7 @@ impl<'a> ast::fold::Fold<()> for InferenceContext<'a> {
|
|||
// assert_eq!(node.custom, None);
|
||||
|
||||
let expr = match &node.node {
|
||||
ast::ExprKind::ListComp { .. } => self.fold_listcomp(node)?,
|
||||
ast::ExprKind::ListComp { .. } => return self.fold_listcomp(node),
|
||||
_ => rustpython_parser::ast::fold::fold_expr(self, node)?
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue