From 217fd20a0f96e2682be376d1aecf9c2f1cb862d2 Mon Sep 17 00:00:00 2001 From: ondra05 Date: Fri, 6 May 2022 21:12:55 +0200 Subject: [PATCH] changed undefined -> cart coercion --- ablescript/src/variables.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ablescript/src/variables.rs b/ablescript/src/variables.rs index 37259b5..3c6b964 100644 --- a/ablescript/src/variables.rs +++ b/ablescript/src/variables.rs @@ -349,9 +349,8 @@ impl Value { pub fn into_cart(self) -> Cart { match self { Value::Nul => HashMap::new(), - Value::Undefined => [(2, 4), (4, 2)] + Value::Undefined => [(Value::Undefined, ValueRef::new(Value::Undefined))] .into_iter() - .map(|(k, v)| (Value::Int(k), ValueRef::new(Value::Int(v)))) .collect(), Value::Str(s) => s .chars()