Skip to content

Commit

Permalink
Remove FixedBuffer Eq instance and remove Eq on Ripedmd160 context
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenthz committed Oct 3, 2023
1 parent f9e7c9a commit e01255c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions src/cryptoutil.rs
Expand Up @@ -123,15 +123,6 @@ pub(crate) struct FixedBuffer<const N: usize> {
buffer_idx: usize,
}

impl<const N: usize> PartialEq for FixedBuffer<N> {
fn eq(&self, other: &Self) -> bool {
self.buffer_idx == other.buffer_idx
&& self.buffer[0..self.buffer_idx] == other.buffer[0..self.buffer_idx]
}
}

impl<const N: usize> Eq for FixedBuffer<N> {}

impl<const N: usize> FixedBuffer<N> {
/// Create a new buffer
pub const fn new() -> Self {
Expand Down
2 changes: 1 addition & 1 deletion src/hashing/ripemd160.rs
Expand Up @@ -32,7 +32,7 @@ impl Ripemd160 {
}

/// Structure representing the state of a Ripemd160 computation
#[derive(Clone, PartialEq, Eq)]
#[derive(Clone)]
pub struct Context {
h: [u32; DIGEST_BUF_LEN],
processed_bytes: u64,
Expand Down

0 comments on commit e01255c

Please sign in to comment.