Skip to content

Conversation

@tarcieri
Copy link
Member

Renames the following methods of the Random trait:

  • Random::random => Random::random_from_rng
  • Random::try_random => Random::try_random_from_rng

And adds new Random::random and Random::try_random gated on getrandom that use the new getrandom::SysRng to call the old rand_core-based methods.

@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

❌ Patch coverage is 84.74576% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.75%. Comparing base (55403bf) to head (17edf4d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/traits.rs 40.00% 6 Missing ⚠️
src/wrapping.rs 0.00% 2 Missing ⚠️
src/modular/const_monty_form.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1057      +/-   ##
==========================================
- Coverage   78.76%   78.75%   -0.01%     
==========================================
  Files         173      173              
  Lines       17656    17671      +15     
==========================================
+ Hits        13906    13917      +11     
- Misses       3750     3754       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Renames the following methods of the `Random` trait:

- `Random::random` => `Random::random_from_rng`
- `Random::try_random` => `Random::try_random_from_rng`

And adds new `Random::random` and `Random::try_random` gated on
`getrandom` that use the new `getrandom::SysRng` to call the old
`rand_core`-based methods.
@tarcieri tarcieri force-pushed the add-getrandom-feature-and-random-trait-support branch from 4532c90 to 17edf4d Compare December 29, 2025 02:56
@tarcieri tarcieri merged commit f1b5644 into master Dec 29, 2025
27 checks passed
@tarcieri tarcieri deleted the add-getrandom-feature-and-random-trait-support branch December 29, 2025 03:09
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