Merge commit 'd7f78db121ee6f720e97401ded0c9c597d1a4857' into depends-updates-2

This commit is contained in:
Sean Bowe 2020-03-03 17:44:28 -07:00
commit 31d887c943
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
5 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "ff"
version = "0.5.0"
version = "0.5.2"
authors = ["Sean Bowe <ewillbefull@gmail.com>"]
description = "Library for building and interfacing with finite fields"
readme = "README.md"
@ -12,7 +12,7 @@ edition = "2018"
[dependencies]
byteorder = "1"
ff_derive = { version = "0.4.0", path = "ff_derive", optional = true }
ff_derive = { version = "^0.4.1", path = "ff_derive", optional = true }
rand_core = "0.5"
[features]

View File

@ -12,7 +12,7 @@ Add the `ff` crate to your `Cargo.toml`:
```toml
[dependencies]
ff = "0.4"
ff = "0.5"
```
The `ff` crate contains `Field`, `PrimeField`, `PrimeFieldRepr` and `SqrtField` traits.

View File

@ -1,6 +1,6 @@
[package]
name = "ff_derive"
version = "0.4.0"
version = "0.4.1"
authors = ["Sean Bowe <ewillbefull@gmail.com>"]
description = "Procedural macro library used to build custom prime field implementations"
documentation = "https://docs.rs/ff/"

View File

@ -877,7 +877,7 @@ fn prime_field_impl(
impl ::ff::Field for #name {
/// Computes a uniformly random element using rejection sampling.
fn random<R: ::rand_core::RngCore>(rng: &mut R) -> Self {
fn random<R: ::rand_core::RngCore + ?std::marker::Sized>(rng: &mut R) -> Self {
loop {
let mut tmp = {
let mut repr = [0u64; #limbs];

View File

@ -17,7 +17,7 @@ pub trait Field:
Sized + Eq + Copy + Clone + Send + Sync + fmt::Debug + fmt::Display + 'static
{
/// Returns an element chosen uniformly at random using a user-provided RNG.
fn random<R: RngCore>(rng: &mut R) -> Self;
fn random<R: RngCore + ?std::marker::Sized>(rng: &mut R) -> Self;
/// Returns the zero element of the field, the additive identity.
fn zero() -> Self;