clippy: Add type definitions for complex types

This commit is contained in:
Jack Grigg 2021-01-14 13:20:54 +00:00 committed by Sean Bowe
parent 75915f67ed
commit 95314d0f69
No known key found for this signature in database
GPG key ID: 95684257D8F8B031
2 changed files with 9 additions and 10 deletions

View file

@ -506,6 +506,8 @@ impl<C: CurveAffine> Evaluated<C> {
} }
} }
type ColumnPair<F> = (Polynomial<F, LagrangeCoeff>, Polynomial<F, LagrangeCoeff>);
/// Given a column of input values A and a column of table values S, /// Given a column of input values A and a column of table values S,
/// this method permutes A and S to produce A' and S', such that: /// this method permutes A and S to produce A' and S', such that:
/// - like values in A' are vertically adjacent to each other; and /// - like values in A' are vertically adjacent to each other; and
@ -516,13 +518,7 @@ fn permute_column_pair<C: CurveAffine>(
domain: &EvaluationDomain<C::Scalar>, domain: &EvaluationDomain<C::Scalar>,
input_column: &Polynomial<C::Scalar, LagrangeCoeff>, input_column: &Polynomial<C::Scalar, LagrangeCoeff>,
table_column: &Polynomial<C::Scalar, LagrangeCoeff>, table_column: &Polynomial<C::Scalar, LagrangeCoeff>,
) -> Result< ) -> Result<ColumnPair<C::Scalar>, Error> {
(
Polynomial<C::Scalar, LagrangeCoeff>,
Polynomial<C::Scalar, LagrangeCoeff>,
),
Error,
> {
let mut permuted_input_column = input_column.clone(); let mut permuted_input_column = input_column.clone();
// Sort input lookup column values // Sort input lookup column values

View file

@ -87,9 +87,12 @@ trait Query<F>: Sized {
fn get_commitment(&self) -> Self::Commitment; fn get_commitment(&self) -> Self::Commitment;
} }
fn construct_intermediate_sets<F: FieldExt, I, Q: Query<F>>( type IntermediateSets<F, Q> = (
queries: I, Vec<CommitmentData<<Q as Query<F>>::Eval, <Q as Query<F>>::Commitment>>,
) -> (Vec<CommitmentData<Q::Eval, Q::Commitment>>, Vec<Vec<F>>) Vec<Vec<F>>,
);
fn construct_intermediate_sets<F: FieldExt, I, Q: Query<F>>(queries: I) -> IntermediateSets<F, Q>
where where
I: IntoIterator<Item = Q> + Clone, I: IntoIterator<Item = Q> + Clone,
{ {