-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More improvements to std::rand #9695
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
72bf201
std::rand: move the Isaac implementation to its own file.
huonw a2b5096
std::rand: Add an implementation of ISAAC64.
huonw 39a69d3
std::rand: Add OSRng, ReaderRng wrappers around the OS RNG & generic …
huonw f39a215
std::rand: add the StdRng wrapper for a blessed RNG.
huonw 0223cf6
std::rand: Add ReseedingRng, which will reseed an RNG after it genera…
huonw 92725ae
std::rand: Add a trait for seeding RNGs: SeedableRng.
huonw fb97063
std::rand: improve the task_rng code.
huonw 29e3b33
std::rand: make the windows OSRng more correct, remove some C++.
huonw 6f4ec72
std::rand: add & split some tests.
huonw 0b1a0d0
std::rand: move the Rand impls into a separate file for neatness.
huonw 9886979
std::rand: documentation additions & fixes.
huonw 9db32a2
std::rand: adjust the f32 & f64 Rand instances.
huonw 5bb5f76
Convert rt::sched::new_sched_rng to use open/read/close rather than f*.
huonw 71addde
std::rand: remove `seed`.
huonw a836f13
Documentation & address minor point.
huonw 38732c4
std::rand: Correct the implementation of Rand for f32 & f64.
huonw 649c175
std::rand::reader: describe cfg!(endianness).
huonw d86de18
std::rand::reseeding: seed the reseeder in the SeedableRng impl.
huonw 618c6af
std::rand::os: use the externfn! macro for the Windows RNG.
huonw 62feded
std::rand: Make Rng.next_u32 non-default, waiting for #7771.
huonw 5442a47
std::rand: remove seed_task_rng and RUST_SEED.
huonw e678435
std::rand: Minor clean-up of comments & add a missing default method.
huonw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1013,7 +1013,7 @@ mod test_treemap { | |
check_equal(ctrl, &map); | ||
assert!(map.find(&5).is_none()); | ||
|
||
let mut rng = rand::IsaacRng::new_seeded(&[42]); | ||
let mut rng: rand::IsaacRng = rand::SeedableRng::from_seed(&[42]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :(, I'll allow it though |
||
|
||
do 3.times { | ||
do 90.times { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woohoo!