Skip to content

Commit

Permalink
Small cell example update
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored May 26, 2020
1 parent 97f3eee commit b9ba4b3
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 @@ -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:
Expand Down

0 comments on commit b9ba4b3

Please sign in to comment.