mirror of
https://github.com/gnu4cn/rust-lang-zh_CN.git
synced 2025-03-14 19:30:29 +08:00
Update Ch15
This commit is contained in:
parent
37b9f6422c
commit
eb8d4b7b20
@ -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)),
|
||||
|
Loading…
Reference in New Issue
Block a user