Skip to content

Commit

Permalink
Delete stray impl for Option
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Dec 19, 2024
1 parent 51b88a8 commit f717132
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions tree_hash/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,30 +199,6 @@ impl<T: TreeHash> TreeHash for Arc<T> {
}
}

impl<T: TreeHash> TreeHash for Option<T> {
fn tree_hash_type() -> TreeHashType {
T::tree_hash_type()
}

fn tree_hash_packed_encoding(&self) -> PackedEncoding {
match self {
Some(inner) => inner.tree_hash_packed_encoding(),
None => unreachable!(),
}
}

fn tree_hash_packing_factor() -> usize {
T::tree_hash_packing_factor()
}

fn tree_hash_root(&self) -> Hash256 {
match self {
Some(inner) => inner.tree_hash_root(),
None => unreachable!(),
}
}
}

/// A helper function providing common functionality for finding the Merkle root of some bytes that
/// represent a bitfield.
pub fn bitfield_bytes_tree_hash_root<N: Unsigned>(bytes: &[u8]) -> Hash256 {
Expand Down

0 comments on commit f717132

Please sign in to comment.