diff --git a/CHANGELOG.md b/CHANGELOG.md index 554e6fb..a4cc19d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Features +- [\#76](https://github.com/arkworks-rs/r1cs-std/pull/76) Implement `ToBytesGadget` for `Vec`. + ### Improvements ### Bug Fixes diff --git a/src/bits/mod.rs b/src/bits/mod.rs index 3878c84..94ad5fa 100644 --- a/src/bits/mod.rs +++ b/src/bits/mod.rs @@ -116,6 +116,12 @@ impl ToBytesGadget for [UInt8] { } } +impl ToBytesGadget for Vec> { + fn to_bytes(&self) -> Result>, SynthesisError> { + Ok(self.clone()) + } +} + impl<'a, F: Field, T: 'a + ToBytesGadget> ToBytesGadget for &'a T { fn to_bytes(&self) -> Result>, SynthesisError> { (*self).to_bytes()