Skip to content

Commit

Permalink
[Draft] on rust-bitcoin#1068
Browse files Browse the repository at this point in the history
  • Loading branch information
DanGould committed Jun 28, 2022
1 parent b645b6b commit 431a313
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/blockdata/witness.rs
Expand Up @@ -282,8 +282,13 @@ impl serde::Serialize for Witness {
where
S: serde::Serializer,
{
let vec: Vec<_> = self.to_vec();
serde::Serialize::serialize(&vec, serializer)
let mut seq = serializer.serialize_seq(Some(self.witness_elements))?;

for elem in self.iter() {
seq.serialize_element(&elem)?;
}

seq.end()
}
}
#[cfg(feature = "serde")]
Expand Down

0 comments on commit 431a313

Please sign in to comment.