From d9f1f663ee641443e1840e84b0f9e93c191519ac Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Wed, 11 Aug 2021 19:27:15 +0800 Subject: [PATCH] Simplify custom syntax test. --- tests/custom_syntax.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/custom_syntax.rs b/tests/custom_syntax.rs index 34c84115..a5947453 100644 --- a/tests/custom_syntax.rs +++ b/tests/custom_syntax.rs @@ -25,8 +25,8 @@ fn test_custom_syntax() -> Result<(), Box> { |context, inputs| { let var_name = inputs[0].get_variable_name().unwrap().to_string(); let max = inputs[1].get_literal_value::().unwrap(); - let stmt = inputs.get(2).unwrap(); - let condition = inputs.get(3).unwrap(); + let stmt = &inputs[2]; + let condition = &inputs[3]; context.scope_mut().push(var_name.clone(), 0 as INT);