diff options
Diffstat (limited to 'dhall/src/syntax/binary')
-rw-r--r-- | dhall/src/syntax/binary/decode.rs | 2 | ||||
-rw-r--r-- | dhall/src/syntax/binary/encode.rs | 2 | ||||
-rw-r--r-- | dhall/src/syntax/binary/mod.rs | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/dhall/src/syntax/binary/decode.rs b/dhall/src/syntax/binary/decode.rs index 0fd358e..3c93419 100644 --- a/dhall/src/syntax/binary/decode.rs +++ b/dhall/src/syntax/binary/decode.rs @@ -11,7 +11,7 @@ use crate::syntax::{ }; type DecodedExpr = Expr; -pub(crate) fn decode(data: &[u8]) -> Result<DecodedExpr, DecodeError> { +pub fn decode(data: &[u8]) -> Result<DecodedExpr, DecodeError> { match serde_cbor::de::from_slice(data) { Ok(v) => cbor_value_to_dhall(&v), Err(e) => Err(DecodeError::CBORError(e)), diff --git a/dhall/src/syntax/binary/encode.rs b/dhall/src/syntax/binary/encode.rs index 5974f47..8d22a9b 100644 --- a/dhall/src/syntax/binary/encode.rs +++ b/dhall/src/syntax/binary/encode.rs @@ -10,7 +10,7 @@ use crate::syntax::{ Scheme, V, }; -pub(crate) fn encode(expr: &Expr) -> Result<Vec<u8>, EncodeError> { +pub fn encode(expr: &Expr) -> Result<Vec<u8>, EncodeError> { serde_cbor::ser::to_vec(&Serialize::Expr(expr)) .map_err(EncodeError::CBORError) } diff --git a/dhall/src/syntax/binary/mod.rs b/dhall/src/syntax/binary/mod.rs index 7ed1f6e..98e0520 100644 --- a/dhall/src/syntax/binary/mod.rs +++ b/dhall/src/syntax/binary/mod.rs @@ -1,4 +1,4 @@ mod decode; mod encode; -pub(crate) use decode::decode; -pub(crate) use encode::encode; +pub use decode::decode; +pub use encode::encode; |