Skip to content

deps: Bump rand to 0.10#3468

Merged
jqnatividad merged 3 commits intomasterfrom
bump-rand-to-0.10
Feb 13, 2026
Merged

deps: Bump rand to 0.10#3468
jqnatividad merged 3 commits intomasterfrom
bump-rand-to-0.10

Conversation

@jqnatividad
Copy link
Collaborator

No description provided.

jqnatividad and others added 3 commits February 13, 2026 11:46
Update rand crate family to latest versions. Remove "rand/nightly"
feature flag which no longer exists in rand 0.10.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename `Rng` → `RngExt` for extension method imports
- Replace `from_os_rng()` with `rand::make_rng::<T>()`
- Replace deprecated `choose_multiple()` with `sample()`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the rand crate and its ecosystem from version 0.9 to 0.10, along with corresponding API changes. The rand 0.10 release introduced breaking changes that required code migration across the codebase, specifically changing from the Rng trait to RngExt for extension methods, replacing from_os_rng() with make_rng::<T>(), and renaming choose_multiple() to sample().

Changes:

  • Updated rand from 0.9 to 0.10, rand_hc from 0.4 to 0.5, and rand_xoshiro from 0.7 to 0.8 in Cargo.toml
  • Migrated all code to use RngExt trait instead of Rng for extension methods
  • Replaced from_os_rng() calls with rand::make_rng::<T>() throughout the codebase
  • Updated choose_multiple() method calls to sample() in cluster sampling code
  • Removed rand/nightly feature flag (no longer available in rand 0.10)

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Cargo.toml Updated rand dependencies to 0.10, rand_hc to 0.5, rand_xoshiro to 0.8; removed rand/nightly feature
Cargo.lock Lock file updates reflecting new dependency versions and transitive dependencies (chacha20, cpufeatures 0.3.0)
src/main.rs Changed import from rand::Rng to rand::RngExt
src/mainlite.rs Changed import from rand::Rng to rand::RngExt
src/cmd/sort.rs Changed import to RngExt; replaced from_os_rng() with make_rng::<T>()
src/cmd/select.rs Replaced from_os_rng() with make_rng::<T>()
src/cmd/sample.rs Added RngExt to imports (keeping Rng for trait bounds); replaced from_os_rng() with make_rng::<T>(); changed choose_multiple() to sample()
src/cmd/fetch.rs Changed import from rand::Rng to rand::RngExt
src/cmd/fetchpost.rs Changed import from rand::Rng to rand::RngExt
src/odhtcache.rs Changed import from rand::Rng to rand::RngExt in test module
tests/tests.rs Changed import from rand::Rng to rand::RngExt

@jqnatividad jqnatividad merged commit f5e6d2d into master Feb 13, 2026
23 checks passed
@jqnatividad jqnatividad deleted the bump-rand-to-0.10 branch February 13, 2026 16:58
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.

1 participant