Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unsafe blocks are not needed. Rc<RefCell<Node<T>>> is what I used.


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).


Yeah, but you can get more efficiency by using unsafe (Rc allocates extra)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: