Skip to content

Use published rand_distr; fix links #70

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

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/update-0.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
In the following, instructions are provided for porting your code from
`rand 0.8` and `rand_distr 0.4` to `rand 0.9` and `rand_distr 0.5`.

**In progress: rand_distr v0.5 is not published yet!**

The following is a migration guide focussing on potentially-breaking changes. For a full list of changes, see the relevant changelogs:

- [CHANGELOG.md](https://github.com/rust-random/rand/blob/master/CHANGELOG.md).
Expand Down Expand Up @@ -46,7 +44,7 @@ Feature flags:

- `serde1` was renamed to `serde`
- `getrandom` was renamed to `os_rng`
- `thread_rng` is a new feature (enabled by default), required to enable `rand::rng()` (`ThreadRng`)
- `thread_rng` is a new feature (enabled by default), required by [`rng()`] ([`ThreadRng`])
- `small_rng` is now enabled by default
- `rand_chacha` is no longer an (implicit) feature; use `std_rng` instead

Expand Down Expand Up @@ -93,7 +91,7 @@ The old trait `SliceRandom` has been split into three traits: [`IndexedRandom`],

## Distributions

The module `rand::distributions` was renamed to `rand::distr` for brevity and to match `rand_distr`.
The module `rand::distributions` was renamed to [`rand::distr`] for brevity and to match `rand_distr`.

Several items in `distr` were also renamed or moved:

Expand Down Expand Up @@ -122,7 +120,7 @@ The constructors `fn new`, `fn new_inclusive` for [`Uniform`] and [`UniformSampl

### SIMD

SIMD support now targets `std::simd`.
SIMD support now targets [`std::simd`].


## Reproducibility
Expand All @@ -132,7 +130,8 @@ See the `CHANGELOG.md` files for details of reproducibility-breaking changes aff

[`Fill`]: https://docs.rs/rand/latest/rand/trait.Fill.html
[`ThreadRng`]: https://docs.rs/rand/latest/rand/rngs/struct.ThreadRng.html
[`ReseedingRng`]: https://docs.rs/rand/latest/rand/rngs/adapter/struct.ReseedingRng.html
[`ReseedingRng`]: https://docs.rs/rand/lates
t/rand/rngs/adapter/struct.ReseedingRng.html
[`Uniform`]: https://docs.rs/rand/latest/rand/distr/struct.Uniform.html
[`WeightedAliasIndex`]: https://docs.rs/rand_distr/latest/rand_distr/weighted_alias/struct.WeightedAliasIndex.html
[`rand_core`]: https://docs.rs/rand_core/
Expand All @@ -150,3 +149,6 @@ See the `CHANGELOG.md` files for details of reproducibility-breaking changes aff
[`UniformSampler`]: https://docs.rs/rand/latest/rand/distr/uniform/trait.UniformSampler.html
[`Result`]: https://doc.rust-lang.org/stable/std/result/enum.Result.html
[`TryFrom`]: https://doc.rust-lang.org/stable/std/convert/trait.TryFrom.html
[`SeedableRng`]: https://docs.rs/rand_core/latest/rand_core/trait.SeedableRng.html
[`rand::distr`]: https://docs.rs/rand/latest/rand/distr/index.html
[`std::simd`]: https://doc.rust-lang.org/stable/std/simd/index.html
2 changes: 1 addition & 1 deletion tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rand_0_7 = { package = "rand", version = "0.7" }
rand_0_5 = { package = "rand", version = "0.5" }
rand_pcg = { version = "0.9" }
rand_chacha = { version = "0.9" }
rand_distr = { version = "0.5", git = "https://github.com/rust-random/rand.git", tag = "0.9.0" }
rand_distr = { version = "0.5" }
rand_distr_0_4 = { package = "rand_distr", version = "0.4" }
rand_distr_0_2 = { package = "rand_distr", version = "0.2" }
rand_seeder = { version = "0.4" }
Expand Down
Loading