Skip to content

Commit

Permalink
Rollup merge of #72606 - GuillaumeGomez:cell-example-update, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Small cell example update

r? @Dylan-DPC
  • Loading branch information
Dylan-DPC authored May 27, 2020
2 parents 2b3b115 + b9ba4b3 commit 36d6118
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,11 +849,11 @@ impl<T: ?Sized> RefCell<T> {
/// ```
/// use std::cell::RefCell;
///
/// let c = RefCell::new(5);
/// let c = RefCell::new("hello".to_owned());
///
/// *c.borrow_mut() = 7;
/// *c.borrow_mut() = "bonjour".to_owned();
///
/// assert_eq!(*c.borrow(), 7);
/// assert_eq!(&*c.borrow(), "bonjour");
/// ```
///
/// An example of panic:
Expand Down

0 comments on commit 36d6118

Please sign in to comment.