Skip to content

Commit

Permalink
update original
Browse files Browse the repository at this point in the history
  • Loading branch information
funkill committed Dec 11, 2024
1 parent 9208888 commit 7411e95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rustbook-en/src/ch15-06-reference-cycles.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ We still have `leaf` as one of the children of `branch`. Once we have the
reference to its parent. We use the `borrow_mut` method on the
`RefCell<Weak<Node>>` in the `parent` field of `leaf`, and then we use the
`Rc::downgrade` function to create a `Weak<Node>` reference to `branch` from
the `Rc<Node>` in `branch.`
the `Rc<Node>` in `branch`.

When we print the parent of `leaf` again, this time we’ll get a `Some` variant
holding `branch`: now `leaf` can access its parent! When we print `leaf`, we
Expand Down

0 comments on commit 7411e95

Please sign in to comment.