Skip to content

Commit

Permalink
fix lint, PartialOrd for Key
Browse files Browse the repository at this point in the history
  • Loading branch information
dailinsubjam committed Oct 26, 2023
1 parent 3d36e9c commit 07e1f86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions crates/hotshot-signature-key/src/bn254/bn254_priv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ impl BLSPrivKey {

impl PartialOrd for BLSPrivKey {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
let self_bytes = &self.priv_key.to_string();
let other_bytes = &other.priv_key.to_string();
self_bytes.partial_cmp(other_bytes)
Some(self.cmp(other))
}
}

Expand Down
4 changes: 1 addition & 3 deletions crates/hotshot-signature-key/src/bn254/bn254_pub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ pub struct BLSPubKey {

impl PartialOrd for BLSPubKey {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
let self_bytes = &self.pub_key.to_string();
let other_bytes = &other.pub_key.to_string();
self_bytes.partial_cmp(other_bytes)
Some(self.cmp(other))
}
}

Expand Down

0 comments on commit 07e1f86

Please sign in to comment.