Clarify masking of bits in Field::random impls

Co-Authored-By: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
str4d 2019-07-26 19:43:42 +01:00 committed by GitHub
parent 89a68e121d
commit 312141c7fc
1 changed files with 1 additions and 1 deletions

View File

@ -892,7 +892,7 @@ fn prime_field_impl(
#name(#repr(repr))
};
// Mask away the unused bits at the beginning.
// Mask away the unused most-significant bits.
tmp.0.as_mut()[#top_limb_index] &= 0xffffffffffffffff >> REPR_SHAVE_BITS;
if tmp.is_valid() {