Skip to content

Commit 177aeb4

Browse files
committed
clippy fmt
1 parent e84c850 commit 177aeb4

File tree

1 file changed

+1
-42
lines changed

1 file changed

+1
-42
lines changed

pilopt/src/lib.rs

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ fn remove_constant_witness_columns<T: FieldElement>(pil_file: &mut Analyzed<T>)
769769
}
770770

771771
/// Inlines `col i = e` into the references to `x` where `e` is a non-shifted expression with no operations.
772-
/// The reasoning is that intermediate columns are useful to remember intermediate computation results, but in this case
772+
/// The reasoning is that intermediate columns are useful to remember intermediate computation results, but in this case
773773
/// the intermediate results are already known.
774774
fn inline_trivial_intermediate_polynomials<T: FieldElement>(pil_file: &mut Analyzed<T>) {
775775
let intermediate_polys = pil_file
@@ -1094,44 +1094,3 @@ fn remove_duplicate_identities<T: FieldElement>(pil_file: &mut Analyzed<T>) {
10941094
.collect();
10951095
pil_file.remove_identities(&to_remove);
10961096
}
1097-
1098-
/// Identifies witness columns that are directly constrained to be equal to other witness columns
1099-
/// through polynomial identities of the form "x = y" and returns a tuple ((name, id), (name, id))
1100-
/// for each pair of identified columns
1101-
fn equal_constrained<T: FieldElement>(
1102-
expression: &AlgebraicExpression<T>,
1103-
poly_id_to_array_elem: &BTreeMap<PolyID, (&String, Option<usize>)>,
1104-
) -> Option<((String, PolyID), (String, PolyID))> {
1105-
match expression {
1106-
AlgebraicExpression::BinaryOperation(AlgebraicBinaryOperation {
1107-
left,
1108-
op: AlgebraicBinaryOperator::Sub,
1109-
right,
1110-
}) => match (left.as_ref(), right.as_ref()) {
1111-
(AlgebraicExpression::Reference(l), AlgebraicExpression::Reference(r)) => {
1112-
let is_valid = |x: &AlgebraicReference, left: bool| {
1113-
x.is_witness()
1114-
&& if left {
1115-
// We don't allow the left-hand side to be an array element
1116-
// to preserve array integrity (e.g. `x = y` is valid, but `x[0] = y` is not)
1117-
poly_id_to_array_elem.get(&x.poly_id).unwrap().1.is_none()
1118-
} else {
1119-
true
1120-
}
1121-
};
1122-
1123-
if is_valid(l, true) && is_valid(r, false) && r.next == l.next {
1124-
Some(if l.poly_id > r.poly_id {
1125-
((l.name.clone(), l.poly_id), (r.name.clone(), r.poly_id))
1126-
} else {
1127-
((r.name.clone(), r.poly_id), (l.name.clone(), l.poly_id))
1128-
})
1129-
} else {
1130-
None
1131-
}
1132-
}
1133-
_ => None,
1134-
},
1135-
_ => None,
1136-
}
1137-
}

0 commit comments

Comments
 (0)