Use `<= PrimeField::CAPACITY` instead of `< PrimeField::NUM_BITS`

This commit is contained in:
Jack Grigg 2021-12-15 15:42:05 +00:00
parent 5dd7de3cc7
commit 1be54d9f0d
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ where
let to_base_field = |bits: &[Option<bool>]| -> Option<C::Base> {
// To simplify the following logic, require that the all-ones bitstring is
// canonical in the field, by not allowing a length of NUM_BITS.
assert!(bits.len() < C::Base::NUM_BITS as usize);
assert!(bits.len() <= C::Base::CAPACITY as usize);
let bits: Option<Vec<bool>> = bits.iter().cloned().collect();
bits.map(|bits| {