Re:In Defense of Linked Lists
by brundolf on Friday November 04, 2022 @06:06PM
(#33474540)
It's at odds with it, but so are many other data structures found in the standard library. The solution is usually to use unsafe { } inside the data structure to allow those criss-crossing pointers (while exposing safe, checker-friendly interfaces to the outside world)
This is a great resource that outlines several different strategies for implementing linked lists in Rust: https://rust-unofficial.github.io/too-many-lists/