diff options
author | Nadrieril | 2019-04-15 12:22:02 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-15 12:22:02 +0200 |
commit | 63aa21c581933a10b2b1ab96c632c72834cf2115 (patch) | |
tree | 9e534d7a4107fae5aae33637a5ea7c8a2f58c873 /dhall/src/binary.rs | |
parent | 75420d0822652d6592b74199ea35281dbdf84efb (diff) |
Handle empty optionals correctly
Closes #78
Diffstat (limited to '')
-rw-r--r-- | dhall/src/binary.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dhall/src/binary.rs b/dhall/src/binary.rs index 8a23e76..72704de 100644 --- a/dhall/src/binary.rs +++ b/dhall/src/binary.rs @@ -107,7 +107,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<ParsedExpr, DecodeError> { } [U64(5), t] => { let t = cbor_value_to_dhall(&t)?; - EmptyOptionalLit(t) + OldOptionalLit(None, t) } [U64(5), Null, x] => { let x = cbor_value_to_dhall(&x)?; @@ -116,7 +116,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<ParsedExpr, DecodeError> { [U64(5), t, x] => { let x = cbor_value_to_dhall(&x)?; let t = cbor_value_to_dhall(&t)?; - Annot(rc(NEOptionalLit(x)), t) + OldOptionalLit(Some(x), t) } [U64(6), x, y] => { let x = cbor_value_to_dhall(&x)?; |