Skip to content

Commit 7555a91

Browse files
committed
Document that serde impl of LeafVersion uses u8 in consensus encoding
Closes #764
1 parent 1f61b11 commit 7555a91

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/taproot.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,7 @@ impl fmt::UpperHex for LeafVersion {
869869
}
870870
}
871871

872+
/// Serializes LeafVersion as u8 using consensus encoding
872873
#[cfg(feature = "serde")]
873874
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
874875
impl ::serde::Serialize for LeafVersion {
@@ -880,6 +881,7 @@ impl ::serde::Serialize for LeafVersion {
880881
}
881882
}
882883

884+
/// Deserializes LeafVersion as u8 using consensus encoding
883885
#[cfg(feature = "serde")]
884886
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
885887
impl<'de> ::serde::Deserialize<'de> for LeafVersion {

0 commit comments

Comments
 (0)