forked from AbleScript/ablescript
changed undefined -> cart coercion
This commit is contained in:
parent
bb6888c22d
commit
f7852109c9
|
@ -349,9 +349,8 @@ impl Value {
|
||||||
pub fn into_cart(self) -> Cart {
|
pub fn into_cart(self) -> Cart {
|
||||||
match self {
|
match self {
|
||||||
Value::Nul => HashMap::new(),
|
Value::Nul => HashMap::new(),
|
||||||
Value::Undefined => [(2, 4), (4, 2)]
|
Value::Undefined => [(Value::Undefined, ValueRef::new(Value::Undefined))]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(k, v)| (Value::Int(k), ValueRef::new(Value::Int(v))))
|
|
||||||
.collect(),
|
.collect(),
|
||||||
Value::Str(s) => s
|
Value::Str(s) => s
|
||||||
.chars()
|
.chars()
|
||||||
|
|
Loading…
Reference in a new issue