From 75915f67eda814eef26eaed008fa9bc7ee8e91c7 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 14 Jan 2021 13:16:56 +0000 Subject: [PATCH] clippy: Small cleanups --- src/plonk/vanishing/prover.rs | 6 +++--- src/plonk/vanishing/verifier.rs | 6 +++--- src/poly/commitment/verifier.rs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plonk/vanishing/prover.rs b/src/plonk/vanishing/prover.rs index 30f11d1..2e0eccc 100644 --- a/src/plonk/vanishing/prover.rs +++ b/src/plonk/vanishing/prover.rs @@ -89,10 +89,10 @@ impl Constructed { } impl Evaluated { - pub(in crate::plonk) fn open<'a>( - &'a self, + pub(in crate::plonk) fn open( + &self, x: ChallengeX, - ) -> impl Iterator> + Clone { + ) -> impl Iterator> + Clone { self.constructed .h_pieces .iter() diff --git a/src/plonk/vanishing/verifier.rs b/src/plonk/vanishing/verifier.rs index f132756..7a4f134 100644 --- a/src/plonk/vanishing/verifier.rs +++ b/src/plonk/vanishing/verifier.rs @@ -70,10 +70,10 @@ impl Evaluated { Ok(()) } - pub(in crate::plonk) fn queries<'a>( - &'a self, + pub(in crate::plonk) fn queries( + &self, x: ChallengeX, - ) -> impl Iterator> + Clone { + ) -> impl Iterator> + Clone { self.h_commitments .iter() .zip(self.h_evals.iter()) diff --git a/src/poly/commitment/verifier.rs b/src/poly/commitment/verifier.rs index f902c37..97d4e04 100644 --- a/src/poly/commitment/verifier.rs +++ b/src/poly/commitment/verifier.rs @@ -160,7 +160,7 @@ fn compute_b(x: F, challenges: &[F]) -> F { /// Computes the coefficients of $g(X) = \prod\limits_{i=0}^{k-1} (1 + u_i X^{2^i})$. fn compute_s(challenges: &[F], init: F) -> Vec { - assert!(challenges.len() > 0); + assert!(!challenges.is_empty()); let mut v = vec![F::zero(); 1 << challenges.len()]; v[0] = init;