4 ms·
Unsafe blocks are not needed. Rc<RefCell<Node<T>>> is what I used.
by dennismar 6y ago
Unsafe blocks are not needed.
Rc<RefCell<Node<T>>> is what I used.
- shepmaster 6y agoThe post you are replying to says "efficiently implemented with unsafe". For a linked list, you generally get (has unsafe code + efficient) or (no unsafe code + not as efficient).
- Ar-Curunir 6y agoYeah, but you can get more efficiency by using unsafe (Rc allocates extra)