From 62a27a51e2c10e5bfae02ff819a5865795596a5d Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 13 Jan 2022 17:53:50 +0100 Subject: [PATCH] Document that serde impl of LeafVersion uses u8 in consensus encoding Closes #764 --- src/util/taproot.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/taproot.rs b/src/util/taproot.rs index 9eb87f6e..a4ef1eac 100644 --- a/src/util/taproot.rs +++ b/src/util/taproot.rs @@ -869,6 +869,7 @@ impl fmt::UpperHex for LeafVersion { } } +/// Serializes LeafVersion as u8 using consensus encoding #[cfg(feature = "serde")] #[cfg_attr(docsrs, doc(cfg(feature = "serde")))] impl ::serde::Serialize for LeafVersion { @@ -880,6 +881,7 @@ impl ::serde::Serialize for LeafVersion { } } +/// Deserializes LeafVersion as u8 using consensus encoding #[cfg(feature = "serde")] #[cfg_attr(docsrs, doc(cfg(feature = "serde")))] impl<'de> ::serde::Deserialize<'de> for LeafVersion {