We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97f3eee commit b9ba4b3Copy full SHA for b9ba4b3
src/libcore/cell.rs
@@ -850,11 +850,11 @@ impl<T: ?Sized> RefCell<T> {
850
/// ```
851
/// use std::cell::RefCell;
852
///
853
- /// let c = RefCell::new(5);
+ /// let c = RefCell::new("hello".to_owned());
854
855
- /// *c.borrow_mut() = 7;
+ /// *c.borrow_mut() = "bonjour".to_owned();
856
857
- /// assert_eq!(*c.borrow(), 7);
+ /// assert_eq!(&*c.borrow(), "bonjour");
858
859
860
/// An example of panic:
0 commit comments