From b9ba4b3810a4f818d2a1e4eb5b17841bd799e519 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 26 May 2020 10:47:54 +0200 Subject: [PATCH] Small cell example update --- src/libcore/cell.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 0f2665eba6f22..40a4fb50c9970 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -850,11 +850,11 @@ impl RefCell { /// ``` /// 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: