changed undefined -> cart coercion

trunk
ondra05 2022-05-06 21:12:55 +02:00
parent 7368a3afd1
commit 217fd20a0f
1 changed files with 1 additions and 2 deletions

View File

@ -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()