Comment Comment by jrvidal > The nice thing is that RefCell is not magicI'd like to point out that `RefCell` does contain a bit of magic, since it is based on `UnsafeCell`, which is _the_ core "primitive" of Rust that enables interior mutability:https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html(Not trying to be pedantic, just to clarify things for less knowledgeable readers). parent jrvidal 6 years ago
I'd like to point out that `RefCell` does contain a bit of magic, since it is based on `UnsafeCell`, which is _the_ core "primitive" of Rust that enables interior mutability:
https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html
(Not trying to be pedantic, just to clarify things for less knowledgeable readers).