reformat code after clippy changes

This commit is contained in:
Will Song
2024-04-04 13:29:58 -04:00
parent e5ec56f6e1
commit a01b1c0189
2 changed files with 2 additions and 5 deletions

View File

@@ -39,8 +39,7 @@ pub fn sub(left: &BigInt, right: &BigInt, field: &BigInt) -> BigInt {
modulus(&(left - right), field)
}
pub fn div(left: &BigInt, right: &BigInt, field: &BigInt) -> Result<BigInt, ArithmeticError> {
let right_inverse =
right.mod_inverse(field).ok_or(ArithmeticError::DivisionByZero)?;
let right_inverse = right.mod_inverse(field).ok_or(ArithmeticError::DivisionByZero)?;
let res = mul(left, &right_inverse, field);
Ok(res)
}

View File

@@ -28,9 +28,7 @@ impl Ord for Degree {
match (self, other) {
// `Constant <= _`
(Constant, Constant) => Ordering::Equal,
(Constant, Linear) | (Constant, Quadratic) | (Constant, NonQuadratic) => {
Ordering::Less
}
(Constant, Linear) | (Constant, Quadratic) | (Constant, NonQuadratic) => Ordering::Less,
// `Linear <= _`
(Linear, Linear) => Ordering::Equal,
(Linear, Quadratic) | (Linear, NonQuadratic) => Ordering::Less,