From 118fc1014bcfc5585fd3ce32348fbfe14bdc05a9 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 18 May 2021 21:32:40 +0200 Subject: Leaner argument parsing --- tests/typeset.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/typeset.rs b/tests/typeset.rs index 1e196446..0d862c81 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -321,8 +321,8 @@ fn register_helpers(scope: &mut Scope, panics: Rc>>) { } let test = move |ctx: &mut EvalContext, args: &mut FuncArgs| -> Value { - let lhs = args.require::(ctx, "left-hand side"); - let rhs = args.require::(ctx, "right-hand side"); + let lhs = args.eat_expect::(ctx, "left-hand side"); + let rhs = args.eat_expect::(ctx, "right-hand side"); if lhs != rhs { panics.borrow_mut().push(Panic { pos: args.span.start, lhs, rhs }); Value::Str(format!("(panic)")) -- cgit v1.2.3