Skip to content

Commit

Permalink
use From instead of ordinary method
Browse files Browse the repository at this point in the history
  • Loading branch information
ecioppettini committed Oct 15, 2020
1 parent 9536a21 commit 8205d53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chain-vote/src/committee.rs
Expand Up @@ -135,8 +135,10 @@ impl MemberPublicKey {
pub fn to_bytes(&self) -> Vec<u8> {
self.0.to_bytes()
}
}

pub fn from_public_key(pk: PublicKey) -> Self {
impl From<PublicKey> for MemberPublicKey {
fn from(pk: PublicKey) -> MemberPublicKey {
MemberPublicKey(pk)
}
}
Expand Down

0 comments on commit 8205d53

Please sign in to comment.