| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Fallout from the previous commits
|
|
Fix the implementation of `std::rand::Rng::fill_bytes()` for
`std::rand::reseeding::ReseedingRng` to call the `fill_bytes()` method
of the underlying RNG rather than itself, which causes infinite
recursion.
Fixes #10202.
|
|
This stops us relying on Default here.
|
|
|
|
|
|
It now:
- can be explicitly seeded from user code (`seed_task_rng`) or from the
environment (`RUST_SEED`, a positive integer)
- automatically reseeds itself from the OS *unless* it was seeded by
either method above
- has more documentation
|
|
This provides 2 methods: .reseed() and ::from_seed that modify and
create respecitively.
Implement this trait for the RNGs in the stdlib for which this makes
sense.
|
|
certain number of bytes.
It is an "RNG adaptor" and so any RNG can be wrapped to have this behaviour.
|