Clippy fix in eval

This commit is contained in:
Greg Shuflin 2021-10-21 12:38:12 -07:00
parent 9b5c3629c0
commit 93d0a2cd7d

View File

@ -186,7 +186,7 @@ impl<'a> State<'a> {
for stmt in stmts {
ret = self.statement(stmt)?;
}
Ok(ret.unwrap_or(Node::Expr(Expr::unit())))
Ok(ret.unwrap_or_else(|| Node::Expr(Expr::unit())))
}
fn expression(&mut self, node: Node) -> EvalResult<Node> {