Skip to content

Commit

Permalink
fix: explicitly define mds diff type (#196)
Browse files Browse the repository at this point in the history
* fix: explicitly define mds diff type

* rm paren
  • Loading branch information
alexander-camuto authored Aug 26, 2023
1 parent 0f00047 commit fe71cd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion halo2_gadgets/src/poseidon/primitives/mds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ pub(super) fn generate_mds<F: FromUniformBytes<64> + Ord, const T: usize>(
acc
} else {
// We can invert freely; by construction, the elements of xs are distinct.
acc * (x - x_m) * (x_j - x_m).invert().unwrap()
let diff: F = x_j - *x_m;
acc * (x - x_m) * diff.invert().unwrap()
}
})
};
Expand Down

0 comments on commit fe71cd4

Please sign in to comment.