Merge rust-bitcoin/rust-secp256k1#528: fix formatting on master
c0ae3e7d35
fix formatting on master (Andrew Poelstra) Pull request description: Looks like I need to check formatting now before merging things :) master CI is broken because of cargo fmt. ACKs for top commit: tcharding: ACKc0ae3e7d35
Tree-SHA512: 9dc22eb5edfb565309cfd14cb9634abba196e46591da8c21d241bd686df8436a8af371c6520ea6ae688fcf81a835919a1bc9a3730f206ba6ef758087efa282e1
This commit is contained in:
commit
4864a33a62
|
@ -71,8 +71,7 @@ impl PartialEq for SecretKey {
|
|||
/// This implementation is designed to be constant time to help prevent side channel attacks.
|
||||
#[inline]
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
let accum = self.0.iter().zip(&other.0)
|
||||
.fold(0, |accum, (a, b)| accum | a ^ b);
|
||||
let accum = self.0.iter().zip(&other.0).fold(0, |accum, (a, b)| accum | a ^ b);
|
||||
unsafe { core::ptr::read_volatile(&accum) == 0 }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue