Remove unnecessary casts.

This commit is contained in:
Frederic Jacobs
2016-12-20 15:00:02 +01:00
parent 6549afdc63
commit 9f9fdb749f

View File

@ -32,7 +32,7 @@ impl PartialEq for PublicKey {
fn eq(&self, other: &Self) -> bool {
self.zero_values == other.zero_values &&
self.one_values == other.one_values &&
self.algorithm as *const Algorithm as usize == other.algorithm as *const Algorithm as usize
self.algorithm as *const Algorithm == other.algorithm as *const Algorithm
}
}
@ -41,7 +41,7 @@ impl Hash for PublicKey {
fn hash<H: Hasher>(&self, state: &mut H) {
self.zero_values.hash(state);
self.one_values.hash(state);
(self.algorithm as *const Algorithm as usize).hash(state);
(self.algorithm as *const Algorithm).hash(state);
}
}