Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienGllmt committed Nov 18, 2020
1 parent 99962d9 commit 9a53af8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion bindings/ergo-lib-wasm/src/secret_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ impl SecretKey {
pub fn to_bytes(&self) -> Vec<u8> {
self.0.to_bytes()
}

}

impl From<SecretKey> for wallet::secret_key::SecretKey {
Expand Down
5 changes: 3 additions & 2 deletions ergo-lib/src/wallet/secret_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl SecretKey {
/// Encode from a serialized key
pub fn to_bytes(&self) -> Vec<u8> {
match self {
SecretKey::DlogSecretKey(key) => key.to_bytes().to_vec()
SecretKey::DlogSecretKey(key) => key.to_bytes().to_vec(),
}
}
}
Expand All @@ -57,7 +57,8 @@ mod tests {
#[test]
fn dlog_roundtrip() {
let sk = SecretKey::random_dlog();
let sk_copy = SecretKey::dlog_from_bytes(&sk.to_bytes().as_slice().try_into().unwrap()).unwrap();
let sk_copy =
SecretKey::dlog_from_bytes(&sk.to_bytes().as_slice().try_into().unwrap()).unwrap();
assert_eq!(sk, sk_copy);
}
}

0 comments on commit 9a53af8

Please sign in to comment.