diff --git a/ff/Cargo.toml b/ff/Cargo.toml index 9ac1f1e..94480b0 100644 --- a/ff/Cargo.toml +++ b/ff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ff" -version = "0.5.0" +version = "0.5.2" authors = ["Sean Bowe "] 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] diff --git a/ff/README.md b/ff/README.md index c3127d8..57ef693 100644 --- a/ff/README.md +++ b/ff/README.md @@ -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. diff --git a/ff/ff_derive/Cargo.toml b/ff/ff_derive/Cargo.toml index 88ba23e..04a9bc2 100644 --- a/ff/ff_derive/Cargo.toml +++ b/ff/ff_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ff_derive" -version = "0.4.0" +version = "0.4.1" authors = ["Sean Bowe "] description = "Procedural macro library used to build custom prime field implementations" documentation = "https://docs.rs/ff/" diff --git a/ff/ff_derive/src/lib.rs b/ff/ff_derive/src/lib.rs index d47ec12..813efe8 100644 --- a/ff/ff_derive/src/lib.rs +++ b/ff/ff_derive/src/lib.rs @@ -877,7 +877,7 @@ fn prime_field_impl( impl ::ff::Field for #name { /// Computes a uniformly random element using rejection sampling. - fn random(rng: &mut R) -> Self { + fn random(rng: &mut R) -> Self { loop { let mut tmp = { let mut repr = [0u64; #limbs]; diff --git a/ff/src/lib.rs b/ff/src/lib.rs index b50cbd5..7662783 100644 --- a/ff/src/lib.rs +++ b/ff/src/lib.rs @@ -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(rng: &mut R) -> Self; + fn random(rng: &mut R) -> Self; /// Returns the zero element of the field, the additive identity. fn zero() -> Self;