psbt::raw: Use hex::format_hex to format the raw key bytes
This commit is contained in:
parent
94b7371424
commit
cdedb0a9d5
|
@ -20,7 +20,7 @@
|
||||||
use std::{fmt, io};
|
use std::{fmt, io};
|
||||||
|
|
||||||
use consensus::encode::{self, ReadExt, WriteExt, Decodable, Encodable, VarInt, serialize, deserialize, MAX_VEC_SIZE};
|
use consensus::encode::{self, ReadExt, WriteExt, Decodable, Encodable, VarInt, serialize, deserialize, MAX_VEC_SIZE};
|
||||||
use hashes::hex::ToHex;
|
use hashes::hex;
|
||||||
use util::psbt::Error;
|
use util::psbt::Error;
|
||||||
|
|
||||||
/// A PSBT key in its raw byte form.
|
/// A PSBT key in its raw byte form.
|
||||||
|
@ -62,12 +62,8 @@ pub struct ProprietaryKey<Subtype = ProprietaryType> where Subtype: Copy + From<
|
||||||
|
|
||||||
impl fmt::Display for Key {
|
impl fmt::Display for Key {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
write!(
|
write!(f, "type: {:#x}, key: ", self.type_value)?;
|
||||||
f,
|
hex::format_hex(&self.key[..], f)
|
||||||
"type: {:#x}, key: {}",
|
|
||||||
self.type_value,
|
|
||||||
self.key[..].to_hex()
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue