fix: use finalize for digest comparison in eq
This commit is contained in:
@@ -13,7 +13,9 @@ impl DigestEngineSha256 {
|
|||||||
|
|
||||||
// Manual implementation of PartialEq
|
// Manual implementation of PartialEq
|
||||||
fn eq(&self, other: &Self) -> bool {
|
fn eq(&self, other: &Self) -> bool {
|
||||||
self.hasher.clone().result().as_slice() == other.hasher.clone().result().as_slice()
|
let result1 = self.hasher.clone().finalize();
|
||||||
|
let result2 = other.hasher.clone().finalize();
|
||||||
|
result1.as_slice() == result2.as_slice()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manual implementation of Eq
|
// Manual implementation of Eq
|
||||||
|
|||||||
Reference in New Issue
Block a user