summaryrefslogtreecommitdiff
path: root/src/eval/mod.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-05-18 21:32:40 +0200
committerLaurenz <laurmaedje@gmail.com>2021-05-18 21:32:40 +0200
commit118fc1014bcfc5585fd3ce32348fbfe14bdc05a9 (patch)
tree51ef7937188776d0343196fda207c77e732859d1 /src/eval/mod.rs
parent7025590405623b99ec93aa6eddc9fc909e8f83a8 (diff)
Leaner argument parsing
Diffstat (limited to 'src/eval/mod.rs')
-rw-r--r--src/eval/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs
index 88110d88..da7fca53 100644
--- a/src/eval/mod.rs
+++ b/src/eval/mod.rs
@@ -401,7 +401,7 @@ impl Eval for ClosureExpr {
for param in params.iter() {
// Set the parameter to `none` if the argument is missing.
let value =
- args.require::<Value>(ctx, param.as_str()).unwrap_or_default();
+ args.eat_expect::<Value>(ctx, param.as_str()).unwrap_or_default();
ctx.scopes.def_mut(param.as_str(), value);
}