Skip to content

Conversation

@dhardy
Copy link
Member

@dhardy dhardy commented Jan 20, 2026

  • Added a CHANGELOG.md entry

Summary

@newpavlov's suggestion: remove this fn

Motivation

UnwrapErr(rng) / UnwrapErr(&mut rng) are obvious counter-parts; rng.unwrap_err() vs (&mut rng).unwrap_err() are less obvious counter-parts.

This seems fine to me. Counter-motivation would be convenience and potentially avoiding the need to import UnwrapErr, but I don't see huge numbers of users of this anyway.

Alternative

Add fn unwrap_mut(&mut rng) -> UnwrapErr(&mut rng).

Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

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

It may be worth to mention in the UnwrapErr docs that it can be used as UnwrapMut(&mut Rng) where Rng is ?Sized.

@dhardy
Copy link
Member Author

dhardy commented Jan 20, 2026

@newpavlov I added doc examples

@newpavlov newpavlov merged commit 3843bbb into master Jan 20, 2026
13 checks passed
@newpavlov newpavlov deleted the push-qpwprkprpvkt branch January 20, 2026 22:36
@dhardy dhardy mentioned this pull request Jan 23, 2026
17 tasks
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.

3 participants