Skip to content

Commit

Permalink
Fix Miri testing
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFeickert committed Aug 23, 2024
1 parent 44ca26b commit 1df9151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ impl PartialEq<[u8; OUT_LEN]> for Hash {
// When testing with Miri, this is _not_ constant time due to library limitations.
// This should _only_ be done for testing!
#[cfg(miri)]
return self.0 == other;
return self.0 == *other;

#[cfg(not(miri))]
constant_time_eq::constant_time_eq_32(&self.0, other)
Expand All @@ -350,7 +350,7 @@ impl PartialEq<[u8]> for Hash {
// When testing with Miri, this is _not_ constant time due to library limitations.
// This should _only_ be done for testing!
#[cfg(miri)]
return self.0 == other;
return self.0 == *other;

#[cfg(not(miri))]
constant_time_eq::constant_time_eq(&self.0, other)
Expand Down

0 comments on commit 1df9151

Please sign in to comment.