Fix Field::random method declarations.

This commit is contained in:
Sean Bowe 2020-03-03 17:39:11 -07:00
parent c49aaceb5d
commit b52e4aac3a
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ impl fmt::Display for Fr {
}
impl Field for Fr {
fn random<R: RngCore>(rng: &mut R) -> Self {
fn random<R: RngCore + ?std::marker::Sized>(rng: &mut R) -> Self {
Fr(Wrapping(rng.next_u32()) % MODULUS_R)
}

View File

@ -317,7 +317,7 @@ impl PrimeField for Fs {
}
impl Field for Fs {
fn random<R: RngCore>(rng: &mut R) -> Self {
fn random<R: RngCore + ?std::marker::Sized>(rng: &mut R) -> Self {
loop {
let mut tmp = {
let mut repr = [0u64; 4];