diff --git a/src/util/psbt/raw.rs b/src/util/psbt/raw.rs index 498c68af..af2e5963 100644 --- a/src/util/psbt/raw.rs +++ b/src/util/psbt/raw.rs @@ -20,7 +20,7 @@ use std::{fmt, io}; 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; /// A PSBT key in its raw byte form. @@ -62,12 +62,8 @@ pub struct ProprietaryKey where Subtype: Copy + From< impl fmt::Display for Key { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "type: {:#x}, key: {}", - self.type_value, - self.key[..].to_hex() - ) + write!(f, "type: {:#x}, key: ", self.type_value)?; + hex::format_hex(&self.key[..], f) } }