Skip to content

chore: upgrade rand to 0.10 and rand_xorshift to 0.5#763

Merged
samueltardieu merged 1 commit intomainfrom
copilot/upgrade-rand-and-rand-xorshift
Mar 10, 2026
Merged

chore: upgrade rand to 0.10 and rand_xorshift to 0.5#763
samueltardieu merged 1 commit intomainfrom
copilot/upgrade-rand-and-rand-xorshift

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

Bumps rand from 0.9.2 → 0.10.0 and rand_xorshift from 0.4.0 → 0.5.0.

API migration

rand 0.10 moves the convenience methods (random, random_range, random_ratio, random_bool) off Rng and onto a new RngExt trait. RngCore is no longer re-exported from rand; its primitives (next_u32, next_u64, etc.) now live on Rng from rand_core.

Import fixes across benches/tests/examples

File Change
benches/algos.rs RngCore as _RngExt as _
benches/separate_components.rs RngCore as _RngExt as _
benches/iai_separate_components.rs RngCore as _RngExt as _
benches/kuhn_munkres.rs Rng as _RngExt as _
benches/iai_kuhn_munkres.rs Rng as _RngExt as _
tests/dijkstra-all.rs Rng as _RngExt as _
examples/kuhn_munkres_complexity.rs RngRngExt

Files already using use rand::prelude::* are unaffected — prelude re-exports RngExt in 0.10.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@samueltardieu samueltardieu marked this pull request as ready for review March 10, 2026 11:47
@github-actions
Copy link

github-actions bot commented Mar 10, 2026

📊 iai-callgrind Benchmark Results

⚠️ 1 Regression(s) Detected

| Benchmark | Base | PR | Change | % |
|-----------|------|----|---------|
| iai_separate_components::bench_separate_components | 15,992,811 | 16,549,909 | +557,098 | +3.48% |

✅ 3 Improvement(s)

| Benchmark | Base | PR | Change | % |
|-----------|------|----|---------|
| iai_kuhn_munkres::kuhn_munkres_size_32 | 303,986 | 296,982 | -7,004 | -2.30% |
| iai_kuhn_munkres::kuhn_munkres_size_64 | 1,434,909 | 1,414,622 | -20,287 | -1.41% |
| iai_kuhn_munkres::kuhn_munkres_size_128 | 4,965,503 | 4,931,229 | -34,274 | -0.69% |

➡️ 16 Unchanged (within ±0.1%)

Click to expand
Benchmark Instructions
iai_algos::corner_to_corner_astar 150,136
iai_algos::corner_to_corner_bfs 2,947,648
iai_algos::corner_to_corner_bfs_bidirectional 3,881,580
iai_algos::corner_to_corner_dfs 3,592,021
iai_algos::corner_to_corner_dijkstra 3,734,617
iai_algos::corner_to_corner_fringe 216,701
iai_algos::corner_to_corner_idastar 194,009
iai_algos::corner_to_corner_iddfs 3,718,131
iai_algos::no_path_astar 3,348,856
iai_algos::no_path_bfs 2,756,526
iai_algos::no_path_bfs_bidirectional 3,383,731
iai_algos::no_path_dfs 3,629,686
iai_algos::no_path_dijkstra 3,691,818
iai_algos::no_path_fringe 4,417,030
iai_edmondskarp::wikipedia_example_dense 38,324
iai_edmondskarp::wikipedia_example_sparse 65,760

iai-callgrind measures instructions executed, which is deterministic and not affected by system load.

Copilot AI changed the title [WIP] Upgrade dependencies for rand and rand_xorshift chore: upgrade rand to 0.10 and rand_xorshift to 0.5 Mar 10, 2026
Co-authored-by: samueltardieu <44656+samueltardieu@users.noreply.github.com>
@samueltardieu samueltardieu force-pushed the copilot/upgrade-rand-and-rand-xorshift branch from 6210026 to 184a174 Compare March 10, 2026 11:55
@samueltardieu samueltardieu enabled auto-merge March 10, 2026 11:55
@samueltardieu samueltardieu added this pull request to the merge queue Mar 10, 2026
Merged via the queue into main with commit 10c72a9 Mar 10, 2026
21 of 22 checks passed
@samueltardieu samueltardieu deleted the copilot/upgrade-rand-and-rand-xorshift branch March 10, 2026 12:35
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