Change visibility so you can export decode_length

This commit is contained in:
Paul Hauner 2018-09-19 14:48:42 +10:00
parent 0fed1997a2
commit 1f74200129
2 changed files with 3 additions and 2 deletions

View File

@ -71,7 +71,7 @@ pub fn decode_ssz_list<T>(ssz_bytes: &[u8], index: usize)
/// Given some number of bytes, interpret the first four /// Given some number of bytes, interpret the first four
/// bytes as a 32-bit big-endian integer and return the /// bytes as a 32-bit big-endian integer and return the
/// result. /// result.
fn decode_length(bytes: &[u8], index: usize, length_bytes: usize) pub fn decode_length(bytes: &[u8], index: usize, length_bytes: usize)
-> Result<usize, DecodeError> -> Result<usize, DecodeError>
{ {
if bytes.len() < length_bytes { if bytes.len() < length_bytes {

View File

@ -10,8 +10,9 @@
extern crate bytes; extern crate bytes;
extern crate ethereum_types; extern crate ethereum_types;
pub mod decode;
mod encode; mod encode;
mod decode;
mod impl_encode; mod impl_encode;
mod impl_decode; mod impl_decode;