Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

rand::distributions -> distr; split uniform module #1470

Merged
merged 6 commits into from
Jul 23, 2024

Conversation

dhardy
Copy link
Member

@dhardy dhardy commented Jul 18, 2024

  • Added a CHANGELOG.md entry

Summary

This includes the contents of and will need a rebase after #1469, so the first real commit here is "Cfg-gate whole rand::seq::index module".

Implements #1381.

Motivation

I have long found the uniform.rs module hard to navigate, hence the split there.

Putting the contents in the existing float/int/other modules would need some quirky imports to keep the uniform public module intact (I also considered making this module private and directly re-exporting the contents, but it seems to serve a purpose, especially for documentation and to house the implementing types like UniformInt). Using new uniform/float.rs etc. modules results in a soft name-clash; the included path renames look better in my editor at least, but I can go the more orthodox approach if preferred.

@dhardy dhardy requested a review from newpavlov July 18, 2024 09:54
@dhardy dhardy force-pushed the reorg branch 2 times, most recently from 8f38384 to b1240aa Compare July 19, 2024 13:36
@dhardy dhardy marked this pull request as ready for review July 23, 2024 13:00
@dhardy dhardy merged commit 2d5948d into rust-random:master Jul 23, 2024
15 checks passed
@dhardy dhardy deleted the reorg branch July 23, 2024 13:14
cratelyn added a commit to linkerd/linkerd2-proxy that referenced this pull request Jan 28, 2025
cratelyn added a commit to linkerd/linkerd2-proxy that referenced this pull request Jan 28, 2025
cratelyn added a commit to linkerd/linkerd2-proxy that referenced this pull request Jan 28, 2025
supersedes #3569.

this branch updates [`rand`](https://github.com/rust-random/rand) from 0.8.5 to 0.9.0.

- [release notes](https://github.com/rust-random/rand/releases)
- [changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [commits](rust-random/rand@0.8.5...0.9.0)

note the changes to `rand::distr::weighted::Error`'s variants. see
rust-random/rand#1382, and
rust-random/rand#1470. in particular, this change:

https://github.com/rust-random/rand/pull/1382/files#diff-b0eb1b0ef894742b65e07f23af6cbeffae64ec8311adb6ea606603e978023e0cL116-R113

most other changes in this branch relate to the renaming of `thread_rng()` to `rng()`,
and `gen()` to `random()`.

---

* build(deps): bump rand from 0.8.5 to 0.9.0

Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.9.0.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.9.0)

---
updated-dependencies:
- dependency-name: rand
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(exp-backoff): address `rand` breaking changes

Signed-off-by: katelyn martin <kate@buoyant.io>

* chore(pool/p2c): address `rand` breaking changes

Signed-off-by: katelyn martin <kate@buoyant.io>

* chore(distribute): address `rand` breaking changes

see rust-random/rand#1382.

in particular, this part of the change:

https://github.com/rust-random/rand/pull/1382/files#diff-b0eb1b0ef894742b65e07f23af6cbeffae64ec8311adb6ea606603e978023e0cL116-R113

see also rust-random/rand#1470.

Signed-off-by: katelyn martin <kate@buoyant.io>

* chore(http/route): address `rand` breaking changes

Signed-off-by: katelyn martin <kate@buoyant.io>

* chore(exp-backoff): address `rand` breaking changes

Signed-off-by: katelyn martin <kate@buoyant.io>

* chore(deny.toml): skip previous `rand` dependencies

this addresses some ci errors related to duplicate dependencies:

```
error[duplicate]: found 2 duplicate entries for crate 'getrandom'
   ┌─ /github/workspace/Cargo.lock:75:1
   │
75 │ ╭ getrandom 0.2.15 registry+https://github.com/rust-lang/crates.io-index
76 │ │ getrandom 0.3.1 registry+https://github.com/rust-lang/crates.io-index
   │ ╰─────────────────────────────────────────────────────────────────────┘ lock entries
   │
```

Signed-off-by: katelyn martin <kate@buoyant.io>

* review(distribute): add `use` statement

Signed-off-by: katelyn martin <kate@buoyant.io>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: katelyn martin <kate@buoyant.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
benjamin-lieser pushed a commit to benjamin-lieser/rand that referenced this pull request Feb 5, 2025
benjamin-lieser pushed a commit to benjamin-lieser/rand that referenced this pull request Feb 5, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants