From cbbc1c6127421f12e0ea1088c4cfd8137781b40e Mon Sep 17 00:00:00 2001 From: Srinath Setty Date: Fri, 10 Mar 2023 09:27:48 -0800 Subject: [PATCH] Generalize TranscriptRepr implementation for slices (#150) * generalize the slice implementation * bump the version --- Cargo.toml | 2 +- src/traits/mod.rs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 43e311d..d7e24d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nova-snark" -version = "0.18.0" +version = "0.18.1" authors = ["Srinath Setty "] edition = "2021" description = "Recursive zkSNARKs without trusted setup" diff --git a/src/traits/mod.rs b/src/traits/mod.rs index 4618402..5138cea 100644 --- a/src/traits/mod.rs +++ b/src/traits/mod.rs @@ -234,12 +234,10 @@ pub trait PrimeFieldExt: PrimeField { fn from_uniform(bytes: &[u8]) -> Self; } -impl, F: PrimeField + TranscriptReprTrait> TranscriptReprTrait - for &[F] -{ +impl> TranscriptReprTrait for &[T] { fn to_transcript_bytes(&self) -> Vec { (0..self.len()) - .map(|i| >::to_transcript_bytes(&self[i])) + .map(|i| self[i].to_transcript_bytes()) .collect::>() .into_iter() .flatten()