diff options
author | Nadrieril | 2019-12-17 12:19:17 +0000 |
---|---|---|
committer | Nadrieril | 2019-12-17 12:19:17 +0000 |
commit | d6fbfc5f6effba8706615cf52536b28abcb91343 (patch) | |
tree | c973539d9cdb43b370e2c623699d045743974266 /dhall/src/syntax/binary | |
parent | 97d5840ef607e9eedb1801c7711684908af82b60 (diff) |
Specialize parsing
Diffstat (limited to '')
-rw-r--r-- | dhall/src/syntax/binary.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/dhall/src/syntax/binary.rs b/dhall/src/syntax/binary.rs index 9fe31ad..ad503ef 100644 --- a/dhall/src/syntax/binary.rs +++ b/dhall/src/syntax/binary.rs @@ -20,6 +20,7 @@ pub(crate) fn decode(data: &[u8]) -> Result<DecodedExpr, DecodeError> { } } +/// Warning: will fail if `expr` contains an `Embed` node. pub(crate) fn encode<E>(expr: &Expr<E>) -> Result<Vec<u8>, EncodeError> { serde_cbor::ser::to_vec(&Serialize::Expr(expr)) .map_err(|e| EncodeError::CBORError(e)) |