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

Add the put family of methods to Option<T> #25149

Closed
wants to merge 1 commit into from

Conversation

tbu-
Copy link
Contributor

@tbu- tbu- commented May 6, 2015

These are similar to the API available for entries of HashMaps (or_insert,
or_insert_with), allowing one to treat the empty and non-empty code path
similarly.

These are similar to the API available for entries of `HashMap`s (`or_insert`,
`or_insert_with`), allowing one to treat the empty and non-empty code path
similarly.
@rust-highfive
Copy link
Collaborator

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

/// assert_eq!(x, Some(10));
/// ```
#[inline]
#[unstable(feature = "rust1", since = "1.0.0")]
Copy link
Member

Choose a reason for hiding this comment

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

master is now 1.1, so if this is accepted, this would need to be fixed

@bluss
Copy link
Member

bluss commented May 6, 2015

We need an RFC for this, is there one already?

@tbu-
Copy link
Contributor Author

tbu- commented May 6, 2015

@bluss No, if this needs one, I'll write one up.

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.

5 participants