Implement most of the recent round of PR feedback

This commit is contained in:
Sam Mohr 2024-10-26 04:17:50 -07:00
parent 03f83a0ba8
commit 6a2ffb2f5a
No known key found for this signature in database
GPG key ID: EA41D161A3C1BC99
13 changed files with 67 additions and 116 deletions

View file

@ -837,8 +837,6 @@ pub enum ValueDef<'a> {
IngestedFileImport(IngestedFileImport<'a>),
Stmt(&'a Loc<Expr<'a>>),
Return(&'a Loc<Expr<'a>>),
}
impl<'a> ValueDef<'a> {
@ -1090,7 +1088,6 @@ impl<'a, 'b> Iterator for RecursiveValueDefIter<'a, 'b> {
}
}
ValueDef::Stmt(loc_expr) => self.push_pending_from_expr(&loc_expr.value),
ValueDef::Return(loc_expr) => self.push_pending_from_expr(&loc_expr.value),
ValueDef::Annotation(_, _) | ValueDef::IngestedFileImport(_) => {}
}
@ -2737,7 +2734,6 @@ impl<'a> Malformed for ValueDef<'a> {
annotation,
}) => path.is_malformed() || annotation.is_malformed(),
ValueDef::Stmt(loc_expr) => loc_expr.is_malformed(),
ValueDef::Return(loc_expr) => loc_expr.is_malformed(),
}
}
}