-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
StdRng was cloned, which created a new rng with the same state. This means that the same random numbers were generated: ``` use rand::{Rng, SeedableRng}; use rand::rngs::StdRng; let mut rng1 = StdRng::from_entropy(); let mut rng2 = rng1.clone(); assert_eq!(rng1.gen::<u32>(), rng2.gen::<u32>()); ``` This commit replaces the `StdRng` with `ThreadRng` in all place where it was used. It also does not store the rng in manager anymore. The credits for finding this bugs go to hrdl <31923882+hrdl-github@users.noreply.github.com>.
- Loading branch information
Showing
6 changed files
with
34 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters