RefCell::borrow_mut example should demonstrate mut

This commit is contained in:
Corey Farwell 2016-01-25 17:07:55 -05:00
parent 62a3a6ecc0
commit a19353643b

View File

@ -414,7 +414,9 @@ impl<T: ?Sized> RefCell<T> {
/// ///
/// let c = RefCell::new(5); /// let c = RefCell::new(5);
/// ///
/// let borrowed_five = c.borrow_mut(); /// *c.borrow_mut() = 7;
///
/// assert_eq!(*c.borrow(), 7);
/// ``` /// ```
/// ///
/// An example of panic: /// An example of panic: