-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Description
In the last paragraph of the Allowing Multiple Owners of Mutable Data with Rc and RefCell section, we have the following.
This technique is pretty neat! By using RefCell<T>, we have an outwardly immutable List value. But we can use the methods on RefCell<T> that provide access to its interior mutability so we can modify our data when we need to.
I find it odd that the book concludes this section by only discussing the role of RefCell and not the Rc part. To me, this would sound more natural as "By using Rc", ... But we can also use the methods on RefCell ... Was the first RefCell meant to say Rc instead? If not, I still feel like this part can be improved.
I'm happy to submit a PR if there's a need.
Metadata
Metadata
Assignees
Labels
No labels