mirror of
https://github.com/gnu4cn/rust-lang-zh_CN.git
synced 2026-08-19 12:43:28 +08:00
Update Ch15
This commit is contained in:
@@ -11,10 +11,12 @@ use std::rc::Rc;
|
||||
fn main() {
|
||||
let value = Rc::new(RefCell::new(5));
|
||||
|
||||
let a = Rc::new(Cons(
|
||||
let a = Rc::new(
|
||||
Cons(
|
||||
Rc::clone(&value),
|
||||
Rc::new(Nil)
|
||||
));
|
||||
)
|
||||
);
|
||||
|
||||
let b = Cons(
|
||||
Rc::new(RefCell::new(3)),
|
||||
|
||||
Reference in New Issue
Block a user