Skip to content

Commit

Permalink
nicer debug on merkle Tree
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Mar 30, 2024
1 parent a48ef37 commit d4940b5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ssz-rs/src/merkleization/merkleize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,7 @@ impl Index<GeneralizedIndex> for Tree {

impl std::fmt::Debug for Tree {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
for chunk in self.0.chunks(BYTES_PER_CHUNK) {
let node = hex::encode(chunk);
f.write_str(&node)?;
f.write_str(",\n")?;
}
Ok(())
f.debug_list().entries(self.0.chunks(BYTES_PER_CHUNK).map(hex::encode)).finish()
}
}

Expand Down

0 comments on commit d4940b5

Please sign in to comment.