rand06-compat
This crate provides a compatibility wrapper between versions 0.6 and 0.9 of rand_core.
Warning about no_std ⚠️
Supporting fallible RNGs is tricky to do in a clean manner. This compat wrapper hardcodes an error code of 1 in the case that the RNG fails.
PRs welcome for a better solution.
Example
use RngCore as RngCore06;
use OsRng;
use Rand0_6CompatExt;
// This function requires an RNG implementing the `0.6` trait.
// Pass in the RNG from `0.9` using compat trait.
foo