Skip to content

Partial migration to rand_core v0.9 #1746

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 12, 2025
Merged

Partial migration to rand_core v0.9 #1746

merged 5 commits into from
Feb 12, 2025

Conversation

newpavlov
Copy link
Member

@newpavlov newpavlov commented Feb 10, 2025

kem and elliptic-curve can not be migrated because of upstream dependencies which still use rand_core v0.6 and expose it in their public API.

getrandom crate features are renamed to os_rng following the similar change in rand_core.

Relevant issue: #1642

@newpavlov newpavlov requested a review from tarcieri February 10, 2025 16:07
@tarcieri
Copy link
Member

Is there a specific reason you changed all of the instances of &mut impl CryptoRngCore to using an explicit R: (Try)CryptoRng parameter as opposed to just simply changing them to &mut impl (Try)CryptoRng?

As discussed in #1087 and #1148, using the impl Trait syntax results in more readable function signatures.

@newpavlov
Copy link
Member Author

Is there a specific reason you changed all of the instances of &mut impl CryptoRngCore to using an explicit R: (Try)CryptoRng parameter as opposed to just simply changing them to &mut impl (Try)CryptoRng?

I did it for symmetry between try and non-try methods. We can't use impl TryCryptoRng because we have to refer to its error type.

@newpavlov newpavlov merged commit 30b826f into master Feb 12, 2025
81 checks passed
@newpavlov newpavlov deleted the rand_v09 branch February 12, 2025 14:24
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