Skip to content

Minor improvement to docs for rc::Rc #31950

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

Closed
lukaslueg opened this issue Feb 28, 2016 · 1 comment
Closed

Minor improvement to docs for rc::Rc #31950

lukaslueg opened this issue Feb 28, 2016 · 1 comment

Comments

@lukaslueg
Copy link
Contributor

The docs for try_unwrap() currently read

Unwraps the contained value if the Rc has only one strong reference.

If I read this correctly, what it is actually saying is

Unwraps the contained value if and only if the Rc has exactly one strong reference.

Is this what is says?

@steveklabnik
Copy link
Member

Yes, that's correct. I'm writing a patch to clarify right now.

steveklabnik added a commit to steveklabnik/rust that referenced this issue Mar 9, 2016
steveklabnik added a commit to steveklabnik/rust that referenced this issue Mar 10, 2016
Clarify that try_unwrap needs exactly one

Fixes rust-lang#31950
steveklabnik added a commit to steveklabnik/rust that referenced this issue Mar 10, 2016
Clarify that try_unwrap needs exactly one

Fixes rust-lang#31950
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

No branches or pull requests

3 participants