Skip to content

Commit

Permalink
remove weird PartialEq
Browse files Browse the repository at this point in the history
  • Loading branch information
joonazan committed Sep 3, 2024
1 parent 77f2677 commit c727b54
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ impl<T, W> Clone for State<T, W> {

impl<T, W> PartialEq for State<T, W> {
fn eq(&self, other: &Self) -> bool {
// does not compare cycle counts to work with tests that
// expect no change after a rollback
self.registers == other.registers
&& self.register_pointer_flags == other.register_pointer_flags
&& self.flags == other.flags
Expand Down Expand Up @@ -233,9 +235,3 @@ pub struct CycleCounts {
pub sha256_cycles: usize,
pub secp256v1_verify_cycles: usize,
}

impl PartialEq for CycleCounts {
fn eq(&self, _: &Self) -> bool {
true // so tests don't require them to be the same after a rollback
}
}

0 comments on commit c727b54

Please sign in to comment.