Skip to content

Update rand crate from 0.9 to 0.10#1865

Merged
GeorgeHahn merged 1 commit intomainfrom
hahn/rand-0-10
Apr 30, 2026
Merged

Update rand crate from 0.9 to 0.10#1865
GeorgeHahn merged 1 commit intomainfrom
hahn/rand-0-10

Conversation

@GeorgeHahn
Copy link
Copy Markdown
Contributor

Summary

  • Update rand from 0.9 to 0.10.1
  • Remove small_rng feature flag (SmallRng is always available in 0.10)
  • Add RngExt import where needed (extension methods like random(), random_range(), random_bool() moved from Rng to RngExt)

@GeorgeHahn GeorgeHahn marked this pull request as ready for review April 29, 2026 22:50
@GeorgeHahn GeorgeHahn requested a review from a team as a code owner April 29, 2026 22:50
- Remove `small_rng` feature flag (SmallRng is always available in 0.10)
- Add `RngExt` import where needed (extension methods like random(),
  random_range(), random_bool() moved from Rng to RngExt)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@GeorgeHahn GeorgeHahn merged commit c2c979b into main Apr 30, 2026
32 checks passed
@GeorgeHahn GeorgeHahn deleted the hahn/rand-0-10 branch April 30, 2026 03:47
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/saluki that referenced this pull request May 7, 2026
…nd 0.9 → 0.10 (#1609)

## Human Summary

Bumps our version of `lading` up to bring in the upgrade to `rand` from DataDog/lading#1865

Subsequent PRs will bump `lading` further to bring in some updates I'm working on (see DataDog/lading#1871), just wanted to get this yak out of the way independently

## Summary

- Updates `lading-payload` git rev to `01ef8d70`, picking up the rand 0.9 → 0.10 upgrade in lading (#1865) and other upstream improvements
- Updates millstone's pinned `rand = "0.9"` to the workspace `rand = "0.10"` to match lading-payload's expectation
- Fixes two `corpus.rs` call sites that broke with the new lading API: `DogStatsD::new` now takes `&Config` instead of `Config`, and the internal generator functions are de-genericized from `R: Rng` to concrete `StdRng`

The rand 0.9 → 0.10 upgrade in rand_core changes how `Rng` is implemented: `rand_core 0.10` only blanket-implements `Rng` for types satisfying `TryRng<Error=Infallible>` via `DerefMut`, which concrete RNGs satisfy through direct impls in the rand crate. Mixing a rand 0.9 `StdRng` with a rand 0.10 trait boundary produced opaque `DerefMut` errors. The fix is to use the same rand version throughout.

## Test plan

- [ ] `cargo check --workspace` passes
- [ ] `cargo clippy -p millstone` passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: travis.thieman <travis.thieman@datadoghq.com>
dd-octo-sts Bot pushed a commit to DataDog/saluki that referenced this pull request May 7, 2026
…nd 0.9 → 0.10 (#1609)

## Human Summary

Bumps our version of `lading` up to bring in the upgrade to `rand` from DataDog/lading#1865

Subsequent PRs will bump `lading` further to bring in some updates I'm working on (see DataDog/lading#1871), just wanted to get this yak out of the way independently

## Summary

- Updates `lading-payload` git rev to `01ef8d70`, picking up the rand 0.9 → 0.10 upgrade in lading (#1865) and other upstream improvements
- Updates millstone's pinned `rand = "0.9"` to the workspace `rand = "0.10"` to match lading-payload's expectation
- Fixes two `corpus.rs` call sites that broke with the new lading API: `DogStatsD::new` now takes `&Config` instead of `Config`, and the internal generator functions are de-genericized from `R: Rng` to concrete `StdRng`

The rand 0.9 → 0.10 upgrade in rand_core changes how `Rng` is implemented: `rand_core 0.10` only blanket-implements `Rng` for types satisfying `TryRng<Error=Infallible>` via `DerefMut`, which concrete RNGs satisfy through direct impls in the rand crate. Mixing a rand 0.9 `StdRng` with a rand 0.10 trait boundary produced opaque `DerefMut` errors. The fix is to use the same rand version throughout.

## Test plan

- [ ] `cargo check --workspace` passes
- [ ] `cargo clippy -p millstone` passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: travis.thieman <travis.thieman@datadoghq.com> f91e8aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants