diff options
author | Nadrieril | 2020-03-18 18:58:51 +0000 |
---|---|---|
committer | Nadrieril | 2020-03-31 21:44:01 +0100 |
commit | 7848c8e8d3147ebe428290558aa6c0efcbf59ee5 (patch) | |
tree | be25355f0fabf6bc5f9b0568e224795058f069a6 /dhall/src/syntax/binary | |
parent | 844dc3defdd7735742ad41eb6d1da8fe2e7f340b (diff) |
Brutally make all of dhall pub
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; |