clippy: Small cleanups

This commit is contained in:
Jack Grigg 2021-01-14 13:16:56 +00:00 committed by Sean Bowe
parent 6dd7595438
commit 75915f67ed
No known key found for this signature in database
GPG key ID: 95684257D8F8B031
3 changed files with 7 additions and 7 deletions

View file

@ -89,10 +89,10 @@ impl<C: CurveAffine> Constructed<C> {
} }
impl<C: CurveAffine> Evaluated<C> { impl<C: CurveAffine> Evaluated<C> {
pub(in crate::plonk) fn open<'a>( pub(in crate::plonk) fn open(
&'a self, &self,
x: ChallengeX<C>, x: ChallengeX<C>,
) -> impl Iterator<Item = ProverQuery<'a, C>> + Clone { ) -> impl Iterator<Item = ProverQuery<'_, C>> + Clone {
self.constructed self.constructed
.h_pieces .h_pieces
.iter() .iter()

View file

@ -70,10 +70,10 @@ impl<C: CurveAffine> Evaluated<C> {
Ok(()) Ok(())
} }
pub(in crate::plonk) fn queries<'a>( pub(in crate::plonk) fn queries(
&'a self, &self,
x: ChallengeX<C>, x: ChallengeX<C>,
) -> impl Iterator<Item = VerifierQuery<'a, C>> + Clone { ) -> impl Iterator<Item = VerifierQuery<'_, C>> + Clone {
self.h_commitments self.h_commitments
.iter() .iter()
.zip(self.h_evals.iter()) .zip(self.h_evals.iter())

View file

@ -160,7 +160,7 @@ fn compute_b<F: Field>(x: F, challenges: &[F]) -> F {
/// Computes the coefficients of $g(X) = \prod\limits_{i=0}^{k-1} (1 + u_i X^{2^i})$. /// Computes the coefficients of $g(X) = \prod\limits_{i=0}^{k-1} (1 + u_i X^{2^i})$.
fn compute_s<F: Field>(challenges: &[F], init: F) -> Vec<F> { fn compute_s<F: Field>(challenges: &[F], init: F) -> Vec<F> {
assert!(challenges.len() > 0); assert!(!challenges.is_empty());
let mut v = vec![F::zero(); 1 << challenges.len()]; let mut v = vec![F::zero(); 1 << challenges.len()];
v[0] = init; v[0] = init;