From 2202d90cc0a838e4a8f9b3df5cddb864bb0ee7f7 Mon Sep 17 00:00:00 2001 From: Daniel Yan Date: Fri, 21 Jul 2023 15:06:12 +0800 Subject: [PATCH] Update cell-refcell.md Fix typo --- src/advance/smart-pointer/cell-refcell.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/advance/smart-pointer/cell-refcell.md b/src/advance/smart-pointer/cell-refcell.md index dbd069b1..76ffe26a 100644 --- a/src/advance/smart-pointer/cell-refcell.md +++ b/src/advance/smart-pointer/cell-refcell.md @@ -223,7 +223,7 @@ fn main() { let s1 = s.clone(); let s2 = s.clone(); // let mut s2 = s.borrow_mut(); - s2.borrow_mut().push_str(", on yeah!"); + s2.borrow_mut().push_str(", oh yeah!"); println!("{:?}\n{:?}\n{:?}", s, s1, s2); } @@ -237,9 +237,9 @@ fn main() { 程序的运行结果也在预料之中: ```console -RefCell { value: "我很善变,还拥有多个主人, on yeah!" } -RefCell { value: "我很善变,还拥有多个主人, on yeah!" } -RefCell { value: "我很善变,还拥有多个主人, on yeah!" } +RefCell { value: "我很善变,还拥有多个主人, oh yeah!" } +RefCell { value: "我很善变,还拥有多个主人, oh yeah!" } +RefCell { value: "我很善变,还拥有多个主人, oh yeah!" } ``` #### 性能损耗