Skip to content

Commit

Permalink
RefCell::borrow_mut example should demonstrate mut
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Jan 25, 2016
1 parent 62a3a6e commit a193536
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libcore/cell.rs
Expand Up @@ -414,7 +414,9 @@ impl<T: ?Sized> RefCell<T> {
///
/// let c = RefCell::new(5);
///
/// let borrowed_five = c.borrow_mut();
/// *c.borrow_mut() = 7;
///
/// assert_eq!(*c.borrow(), 7);
/// ```
///
/// An example of panic:
Expand Down

0 comments on commit a193536

Please sign in to comment.