Show compressed public key in Debug for CompressedPublicKey
This commit is contained in:
parent
c2e3e86106
commit
9db6234ea9
|
@ -271,7 +271,7 @@ impl From<&PublicKey> for PubkeyHash {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An always-compressed Bitcoin ECDSA public key.
|
/// An always-compressed Bitcoin ECDSA public key.
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
pub struct CompressedPublicKey(pub secp256k1::PublicKey);
|
pub struct CompressedPublicKey(pub secp256k1::PublicKey);
|
||||||
|
|
||||||
impl CompressedPublicKey {
|
impl CompressedPublicKey {
|
||||||
|
@ -350,6 +350,12 @@ impl fmt::Display for CompressedPublicKey {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl fmt::Debug for CompressedPublicKey {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
f.write_fmt(format_args!("CompressedPublicKey({})", self))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl FromStr for CompressedPublicKey {
|
impl FromStr for CompressedPublicKey {
|
||||||
type Err = ParseCompressedPublicKeyError;
|
type Err = ParseCompressedPublicKeyError;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue