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 missing examples for std::cell types #34736

Merged
merged 1 commit into from
Jul 12, 2016

Conversation

GuillaumeGomez
Copy link
Member

Fixes #29344.

r? @steveklabnik

/// let c2 = c.get_mut();
/// *c2 += 1;
/// }
/// assert_eq!(c, Cell::new(6));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this just be

assert_eq!(c.get(), 6);

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure!

@GuillaumeGomez GuillaumeGomez force-pushed the cells_doc branch 2 times, most recently from 3ce6191 to 2c964e0 Compare July 11, 2016 12:28
/// use std::cell::Cell;
///
/// let mut c = Cell::new(5);
/// {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this block just be replaced with

*c.get_mut() += 1;

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure!

@GuillaumeGomez
Copy link
Member Author

Updated.

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jul 11, 2016

📌 Commit 76dd020 has been approved by steveklabnik

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 12, 2016
bors added a commit that referenced this pull request Jul 12, 2016
Rollup of 7 pull requests

- Successful merges: #34736, #34737, #34740, #34742, #34749, #34750, #34770
- Failed merges: #33951
@bors bors merged commit 76dd020 into rust-lang:master Jul 12, 2016
@GuillaumeGomez GuillaumeGomez deleted the cells_doc branch July 12, 2016 14:07
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.

4 participants