Skip to content
This repository was archived by the owner on Jun 7, 2026. It is now read-only.

Commit 430e26a

Browse files
authored
Merge pull request zkcrypto#57 from baloo/baloo/relax-rng
Relax Sized requirements on the rng
2 parents 42e0ad5 + f3537bc commit 430e26a

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ and this library adheres to Rust's notion of
99
### Changed
1010
- MSRV is now 1.63.0.
1111
- Migrated to `ff 0.14`, `rand_core 0.9`.
12+
- `group::Group::random(rng: impl RngCore) -> Self` has been changed to
13+
`Group::random<R: RngCore + ?Sized>(rng: &mut R) -> Self`, to enable passing a
14+
trait object as the RNG.
1215

1316
## [0.13.0] - 2022-12-06
1417
### Changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub trait Group:
7676
/// this group.
7777
///
7878
/// This function is non-deterministic, and samples from the user-provided RNG.
79-
fn random(rng: impl RngCore) -> Self;
79+
fn random<R: RngCore + ?Sized>(rng: &mut R) -> Self;
8080

8181
/// Returns the additive identity, also known as the "neutral element".
8282
fn identity() -> Self;

0 commit comments

Comments
 (0)