From 93d0a2cd7d00a72f765baf8ada9765b8d9f29391 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Thu, 21 Oct 2021 12:38:12 -0700 Subject: [PATCH] Clippy fix in eval --- schala-lang/language/src/eval/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schala-lang/language/src/eval/mod.rs b/schala-lang/language/src/eval/mod.rs index 01d35b8..1464178 100644 --- a/schala-lang/language/src/eval/mod.rs +++ b/schala-lang/language/src/eval/mod.rs @@ -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 {