Module snarkvm_algorithms::polycommit::optional_rng
source · Expand description
A random number generator that bypasses some limitations of the Rust borrow checker.
Structs§
OptionalRng
is a hack that is necessary becauseOption<&mut R>
is not implicitly reborrowed like&mut R
is. This causes problems when a variable of typeOption<&mut R>
is moved (eg, in a loop).