Fix clippy lints

This commit is contained in:
Paul Hauner
2019-04-03 16:23:09 +11:00
parent 1d34e2b2a5
commit 1913be0c6f
22 changed files with 76 additions and 105 deletions

View File

@@ -3,7 +3,7 @@ use serde_derive::{Deserialize, Serialize};
use std::fmt;
use std::hash::{Hash, Hasher};
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, Eq, Serialize, Deserialize)]
pub struct Keypair {
pub sk: SecretKey,
pub pk: PublicKey,
@@ -22,6 +22,12 @@ impl Keypair {
}
}
impl PartialEq for Keypair {
fn eq(&self, other: &Keypair) -> bool {
self == other
}
}
impl Hash for Keypair {
/// Note: this is distinct from consensus serialization, it will produce a different hash.
///