|
/// Filters out pairs where the point is the identity element (infinity). |
|
/// Returns an error if the lengths of the input slices mismatch. |
|
fn msm(points: &[Self], scalars: &[Scalar]) -> Self { |
|
// Assert input validity |
|
assert_eq!(points.len(), scalars.len(), "mismatched lengths"); |
Based on the comment it is unclear if the function is supposed to return an error instead of an assertion in case of input mismatch, most likely it seems that the assertion is correct and comment is wrong but we were curious about the intent here.
monorepo/cryptography/src/bls12381/primitives/group.rs
Lines 698 to 702 in b5c3a11
Based on the comment it is unclear if the function is supposed to return an error instead of an assertion in case of input mismatch, most likely it seems that the assertion is correct and comment is wrong but we were curious about the intent here.