File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,9 @@ impl Hash {
147147 } ;
148148
149149 let len = node1. length + node2. length ;
150- let size: Vec < u8 > = ( || Ok :: < _ , EncodingError > ( to_encoded_bytes ! ( len. as_fixed_width( ) ) ) ) ( )
151- . expect ( "Encoding u64 should not fail" ) ;
150+ let size: Box < [ u8 ] > =
151+ ( || Ok :: < _ , EncodingError > ( to_encoded_bytes ! ( len. as_fixed_width( ) ) ) ) ( )
152+ . expect ( "Encoding u64 should not fail" ) ;
152153
153154 let mut hasher = Blake2b256 :: new ( ) ;
154155 hasher. update ( PARENT_TYPE ) ;
Original file line number Diff line number Diff line change @@ -662,7 +662,10 @@ impl MerkleTree {
662662 for ( _, node) in self . unflushed . drain ( ) {
663663 let buffer = ( || {
664664 let hash = as_array :: < 32 > ( & node. hash ) ?;
665- Ok :: < Vec < u8 > , EncodingError > ( to_encoded_bytes ! ( node. length. as_fixed_width( ) , hash) )
665+ Ok :: < Box < [ u8 ] > , EncodingError > ( to_encoded_bytes ! (
666+ node. length. as_fixed_width( ) ,
667+ hash
668+ ) )
666669 } ) ( )
667670 . expect ( "Encoding u64 should not fail" ) ;
668671 infos_to_flush. push ( StoreInfo :: new_content (
You can’t perform that action at this time.
0 commit comments