Re:Rust Starter Kit 2020
by dennismar on Saturday October 03, 2020 @02:59PM
(#24673959)
Unsafe blocks are not needed.
Rc<RefCell<Node<T>>> is what I used.
[ Parent
| on HN ]
Re:Rust Starter Kit 2020
by shepmaster on Saturday October 03, 2020 @03:15PM
(#24674057)
The 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).
Re:Rust Starter Kit 2020
by Ar-Curunir on Saturday October 03, 2020 @03:18PM
(#24674076)
Yeah, but you can get more efficiency by using unsafe (Rc allocates extra)