Skip to content

signature: use R: CryptoRngCore + ?Sized for RNG params #1167

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 1 commit into from
Dec 10, 2022

Conversation

tarcieri
Copy link
Member

As discussed in #1148, adopts a generic paramater R for RNGs, and also adds a ?Sized bound which permits the use of trait objects.

As discussed in #1148, adopts a generic paramater `R` for RNGs, and also
adds a `?Sized` bound which permits the use of trait objects.
@tarcieri tarcieri merged commit b12237e into master Dec 10, 2022
@tarcieri tarcieri deleted the signature/use-generic-rng-params branch December 10, 2022 23:07
tarcieri added a commit that referenced this pull request Jan 6, 2023
This reverts commit b12237e.

As further discussed in #1148, passing a trait object to
`&mut impl CryptoRngCore` is possible by mutably borrowing it, and
upstream changes to `CryptoRng` should eliminate the requirement for
the `?Sized` bound.
tarcieri added a commit that referenced this pull request Jan 6, 2023
This reverts commit b12237e.

As further discussed in #1148, passing a trait object to
`&mut impl CryptoRngCore` is possible by mutably borrowing it, and
upstream changes to `CryptoRng` should eliminate the requirement for
the `?Sized` bound.
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