Skip to content

Commit

Permalink
reformat code after clippy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
incertia committed Apr 4, 2024
1 parent e5ec56f commit a01b1c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions circom_algebra/src/modular_arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a01b1c0

Please sign in to comment.