-
Notifications
You must be signed in to change notification settings - Fork 431
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: rust-random/rand
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 98a1aaf
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: rust-random/rand
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6a6b9fd
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 10 commits
- 6 files changed
- 3 contributors
Commits on Dec 31, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 3c19b97 - Browse repository at this point
Copy the full SHA 3c19b97View commit details -
Configuration menu - View commit details
-
Copy full SHA for a63eb3a - Browse repository at this point
Copy the full SHA a63eb3aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e5eec8e - Browse repository at this point
Copy the full SHA e5eec8eView commit details
Commits on Jan 1, 2021
-
Merge pull request #1081 from taiki-e/playground
Enable all stable features in the playground
Configuration menu - View commit details
-
Copy full SHA for 34aa769 - Browse repository at this point
Copy the full SHA 34aa769View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb4b8a4 - Browse repository at this point
Copy the full SHA eb4b8a4View commit details
Commits on Jan 2, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 594aed8 - Browse repository at this point
Copy the full SHA 594aed8View commit details
Commits on Jan 4, 2021
-
Merge pull request #1083 from dhardy/work
Fix #1082 (seed_from_u64 with non multiple of 4)
Configuration menu - View commit details
-
Copy full SHA for bda9974 - Browse repository at this point
Copy the full SHA bda9974View commit details
Commits on Jan 12, 2021
-
distributions/uniform: fix panic in gen_range(0..=MAX)
This commit fixes a panic when generating a single sample in an inclusive range that spans the entire integer range, eg for u8: ```rust rng.gen_range(0..=u8::MAX) // panicked at 'attempt to add with overflow', src/distributions/uniform.rs:529:42 ``` [Playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=use%20rand%3A%3ARng%3B%0A%0Afn%20main()%20%7B%0A%20%20%20%20rand%3A%3Athread_rng().gen_range(0u8..%3D255u8)%3B%0A%7D). The cause is a discrepancy between the "single sample" and the "many samples" codepaths: ```rust // Ok UniformSampler::new_inclusive(u8::MIN, u8::MAX).sample(&mut rng); // Panic UniformSampler::sample_single_inclusive(u8::MIN, u8::MAX, &mut rng); ``` In `sample`, a `range` of 0 is interpreted to mean "sample from the whole range". In `sample_range_inclusive`, no check is performed, which leads to overflow when computing the `ints_to_reject`. **Testing** - Added a test case. - Old code panics, new code passes.
Configuration menu - View commit details
-
Copy full SHA for 4e8c7a4 - Browse repository at this point
Copy the full SHA 4e8c7a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c9085a - Browse repository at this point
Copy the full SHA 2c9085aView commit details
Commits on Jan 13, 2021
-
Merge pull request #1087 from GautierMinster/fix_uniform_int_panic_on…
…_full_inclusive_range distributions/uniform: fix panic in gen_range(0..=MAX)
Configuration menu - View commit details
-
Copy full SHA for 6a6b9fd - Browse repository at this point
Copy the full SHA 6a6b9fdView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 98a1aaf...6a6b9fd