@@ -144,7 +144,7 @@ impl str::FromStr for SecretKey {
144
144
/// ```
145
145
/// [`bincode`]: https://docs.rs/bincode
146
146
/// [`cbor`]: https://docs.rs/cbor
147
- #[ derive( Copy , Clone , Debug , PartialOrd , Ord , PartialEq , Eq , Hash ) ]
147
+ #[ derive( Copy , Clone , PartialOrd , Ord , PartialEq , Eq , Hash ) ]
148
148
#[ repr( transparent) ]
149
149
pub struct PublicKey ( ffi:: PublicKey ) ;
150
150
impl_fast_comparisons ! ( PublicKey ) ;
@@ -163,6 +163,10 @@ impl fmt::Display for PublicKey {
163
163
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result { fmt:: LowerHex :: fmt ( self , f) }
164
164
}
165
165
166
+ impl fmt:: Debug for PublicKey {
167
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result { fmt:: LowerHex :: fmt ( self , f) }
168
+ }
169
+
166
170
impl str:: FromStr for PublicKey {
167
171
type Err = Error ;
168
172
fn from_str ( s : & str ) -> Result < PublicKey , Error > {
@@ -1138,7 +1142,7 @@ impl CPtr for Keypair {
1138
1142
/// ```
1139
1143
/// [`bincode`]: https://docs.rs/bincode
1140
1144
/// [`cbor`]: https://docs.rs/cbor
1141
- #[ derive( Copy , Clone , Debug , PartialOrd , Ord , PartialEq , Eq , Hash ) ]
1145
+ #[ derive( Copy , Clone , PartialOrd , Ord , PartialEq , Eq , Hash ) ]
1142
1146
pub struct XOnlyPublicKey ( ffi:: XOnlyPublicKey ) ;
1143
1147
impl_fast_comparisons ! ( XOnlyPublicKey ) ;
1144
1148
@@ -1156,6 +1160,10 @@ impl fmt::Display for XOnlyPublicKey {
1156
1160
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result { fmt:: LowerHex :: fmt ( self , f) }
1157
1161
}
1158
1162
1163
+ impl fmt:: Debug for XOnlyPublicKey {
1164
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result { fmt:: LowerHex :: fmt ( self , f) }
1165
+ }
1166
+
1159
1167
impl str:: FromStr for XOnlyPublicKey {
1160
1168
type Err = Error ;
1161
1169
fn from_str ( s : & str ) -> Result < XOnlyPublicKey , Error > {
0 commit comments