From 293ca9f7f3cd13162f061572b1e3ef6346c4e7da Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Fri, 15 Nov 2024 16:42:47 +1100 Subject: [PATCH] Delete custom impls --- ssz/src/bitfield.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/ssz/src/bitfield.rs b/ssz/src/bitfield.rs index c53ff9c..ce5b442 100644 --- a/ssz/src/bitfield.rs +++ b/ssz/src/bitfield.rs @@ -110,7 +110,7 @@ pub type BitVector = Bitfield>; /// The internal representation of the bitfield is the same as that required by SSZ. The lowest /// byte (by `Vec` index) stores the lowest bit-indices and the right-most bit stores the lowest /// bit-index. E.g., `smallvec![0b0000_0001, 0b0000_0010]` has bits `0, 9` set. -#[derive(Clone, Debug)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct Bitfield { bytes: SmallVec<[u8; SMALLVEC_LEN]>, len: usize, @@ -544,22 +544,6 @@ impl Bitfield { } } -impl Eq for Bitfield {} -impl PartialEq for Bitfield { - #[inline] - fn eq(&self, other: &Bitfield) -> bool { - self.len == other.len && self.bytes == other.bytes - } -} - -impl core::hash::Hash for Bitfield { - #[inline] - fn hash(&self, state: &mut H) { - core::hash::Hash::hash(&self.bytes, state); - core::hash::Hash::hash(&self.len, state); - } -} - /// Returns the minimum required bytes to represent a given number of bits. /// /// `bit_len == 0` requires a single byte.