Skip to content

Unwrap ref #7

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Unwrap ref #7

wants to merge 2 commits into from

Conversation

Kixunil
Copy link

@Kixunil Kixunil commented May 7, 2017

This PR adds methods for unsafe unwrapping references out of Option and Result. Although Option::as_ref() and Option::as_mut() might suffice and it is probable that compiler would optimize it away, these method provide more convenience.

@reem
Copy link
Owner

reem commented May 9, 2017

Isn't this redundant with option.as_ref().unchecked_unwrap()?

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