Skip to content

Commit 817afee

Browse files
author
Scott Robinson
authored
Derive comparison traits for all secret key types
1 parent fd9ef55 commit 817afee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/descriptor/key.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub enum DescriptorPublicKey {
2222
}
2323

2424
/// The descriptor secret key, either a single private key or an xprv.
25-
#[derive(Debug)]
25+
#[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd, Hash)]
2626
pub enum DescriptorSecretKey {
2727
/// Single private key.
2828
Single(SinglePriv),
@@ -40,7 +40,7 @@ pub struct SinglePub {
4040
}
4141

4242
/// A descriptor [`bitcoin::PrivateKey`] with optional origin information.
43-
#[derive(Debug)]
43+
#[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd, Hash)]
4444
pub struct SinglePriv {
4545
/// Origin information (fingerprint and derivation path).
4646
pub origin: Option<(bip32::Fingerprint, bip32::DerivationPath)>,

0 commit comments

Comments
 (0)