Use hex-conservative to display pubkey
We introduced `hex-conservative` ages ago, use it to display the `PublicKey`.
This commit is contained in:
parent
d08d3efdfa
commit
c82f26e960
|
@ -220,12 +220,8 @@ pub struct SortKey(ArrayVec<u8, 65>);
|
|||
|
||||
impl fmt::Display for PublicKey {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
// TODO: fast hex encoding
|
||||
self.with_serialized(|bytes| {
|
||||
for ch in bytes {
|
||||
write!(f, "{:02x}", ch)?;
|
||||
}
|
||||
Ok(())
|
||||
fmt::Display::fmt(&bytes.as_hex(), f)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue