From 1f74200129279a9227a8c290bb8db92f4808f495 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 19 Sep 2018 14:48:42 +1000 Subject: [PATCH] Change visibility so you can export decode_length --- ssz/src/decode.rs | 2 +- ssz/src/lib.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ssz/src/decode.rs b/ssz/src/decode.rs index 15c053bcf..9d4132be8 100644 --- a/ssz/src/decode.rs +++ b/ssz/src/decode.rs @@ -71,7 +71,7 @@ pub fn decode_ssz_list(ssz_bytes: &[u8], index: usize) /// Given some number of bytes, interpret the first four /// bytes as a 32-bit big-endian integer and return the /// result. -fn decode_length(bytes: &[u8], index: usize, length_bytes: usize) +pub fn decode_length(bytes: &[u8], index: usize, length_bytes: usize) -> Result { if bytes.len() < length_bytes { diff --git a/ssz/src/lib.rs b/ssz/src/lib.rs index 6a0fd66ce..d75072801 100644 --- a/ssz/src/lib.rs +++ b/ssz/src/lib.rs @@ -10,8 +10,9 @@ extern crate bytes; extern crate ethereum_types; +pub mod decode; + mod encode; -mod decode; mod impl_encode; mod impl_decode;