From fe9a8d94957e834dbee3a3894280944209a3f791 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 5 Jul 2022 19:11:31 -0400 Subject: [PATCH] Add must_use to the BatchVerifier's verify -> bool functions --- crypto/multiexp/src/batch.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/multiexp/src/batch.rs b/crypto/multiexp/src/batch.rs index 95a09df5..d9e8e74b 100644 --- a/crypto/multiexp/src/batch.rs +++ b/crypto/multiexp/src/batch.rs @@ -33,12 +33,14 @@ impl BatchVerifier where ::Scalar: PrimeF self.0.push((id, pairs.into_iter().map(|(scalar, point)| (scalar * u, point)).collect())); } + #[must_use] pub fn verify(&self) -> bool { multiexp( &self.0.iter().flat_map(|pairs| pairs.1.iter()).cloned().collect::>() ).is_identity().into() } + #[must_use] pub fn verify_vartime(&self) -> bool { multiexp_vartime( &self.0.iter().flat_map(|pairs| pairs.1.iter()).cloned().collect::>()