Skip to content

Commit 7f06e91

Browse files
committed
LowerHex and UpperHex implementations for LeafVersion
1 parent 6a3f3aa commit 7f06e91

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/util/taproot.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,18 @@ impl fmt::Display for LeafVersion {
857857
}
858858
}
859859

860+
impl fmt::LowerHex for LeafVersion {
861+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
862+
fmt::LowerHex::fmt(&self.into_consensus(), f)
863+
}
864+
}
865+
866+
impl fmt::UpperHex for LeafVersion {
867+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
868+
fmt::UpperHex::fmt(&self.into_consensus(), f)
869+
}
870+
}
871+
860872
#[cfg(feature = "serde")]
861873
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
862874
impl ::serde::Serialize for LeafVersion {

0 commit comments

Comments
 (0)