Skip to content
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

rand_core: introduce an UnwrapMut wrapper #1589

Merged
merged 1 commit into from
Feb 16, 2025

Conversation

baloo
Copy link
Contributor

@baloo baloo commented Feb 15, 2025

Summary

Motivation

This is used when a method takes in a &mut impl TryRngCore but the inner method requires an &mut impl RngCore.

An UnwrapErr can not be used as it requires ownership of the rng.

Details

rand_core/src/lib.rs Outdated Show resolved Hide resolved
rand_core/src/lib.rs Outdated Show resolved Hide resolved
This is used when a method takes in a `&mut impl TryRngCore` but the inner
method requires an `&mut impl RngCore`.

An `UnwrapErr` can not be used as it requires ownership of the rng.
@baloo baloo force-pushed the baloo/rand_core/unwrap_ref branch from 8bf3a29 to 3de46b1 Compare February 15, 2025 17:11
@baloo baloo changed the title rand_core: introduce an UnwrapRef wrapper rand_core: introduce an UnwrapMut wrapper Feb 15, 2025
Copy link
Member

@dhardy dhardy left a comment

Choose a reason for hiding this comment

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

Thanks!

@dhardy dhardy merged commit 6a06056 into rust-random:master Feb 16, 2025
15 checks passed
@baloo baloo deleted the baloo/rand_core/unwrap_ref branch February 16, 2025 08:47
@baloo
Copy link
Contributor Author

baloo commented Feb 16, 2025

Would you happen to know what the release schedule looks like?

(And how long that will take to get patch release with this?)

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