@@ -15,7 +15,9 @@ use std::iter::once;
1515use std:: num:: NonZeroUsize ;
1616use std:: sync:: Arc ;
1717use storage:: {
18- BranchNode , Child , FileIoError , HashType , Hashable , HashedNodeReader , ImmutableProposal , LeafNode , LinearAddress , MutableProposal , NibblesIterator , Node , NodeStore , Path , ReadableStorage , SharedNode , TrieReader , ValueDigest
18+ BranchNode , Child , FileIoError , HashType , Hashable , HashedNodeReader , ImmutableProposal ,
19+ LeafNode , LinearAddress , MutableProposal , NibblesIterator , Node , NodeStore , Path ,
20+ ReadableStorage , SharedNode , TrieReader , ValueDigest ,
1921} ;
2022
2123/// Keys are boxed u8 slices
@@ -204,7 +206,10 @@ impl<T: TrieReader> Merkle<T> {
204206 todo ! ( )
205207 }
206208
207- pub ( crate ) fn path_iter < ' a > ( & self , key : & ' a [ u8 ] ) -> Result < PathIterator < ' _ , ' a , T > , FileIoError > {
209+ pub ( crate ) fn path_iter < ' a > (
210+ & self ,
211+ key : & ' a [ u8 ] ,
212+ ) -> Result < PathIterator < ' _ , ' a , T > , FileIoError > {
208213 PathIterator :: new ( & self . nodestore , key)
209214 }
210215
@@ -380,7 +385,11 @@ impl<T: HashedNodeReader> Merkle<T> {
380385 pub ( crate ) fn dump ( & self ) -> Result < String , Error > {
381386 let mut result = String :: new ( ) ;
382387 writeln ! ( result, "digraph Merkle {{\n rankdir=LR;" ) . map_err ( Error :: other) ?;
383- if let Some ( ( root_addr, root_hash) ) = self . nodestore . root_address_and_hash ( ) . expect ( "failed to get root address and hash" ) {
388+ if let Some ( ( root_addr, root_hash) ) = self
389+ . nodestore
390+ . root_address_and_hash ( )
391+ . expect ( "failed to get root address and hash" )
392+ {
384393 writeln ! ( result, " root -> {root_addr}" ) . map_err ( Error :: other) ?;
385394 let mut seen = HashSet :: new ( ) ;
386395 // If ethhash is off, root_hash.into() is already the correct type
0 commit comments