diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/cell.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 0f2665eba6f..40a4fb50c99 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -850,11 +850,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: |
