Re:Friendship ended with the garbage collector
by ameixaseca on Friday August 27, 2021 @10:29PM
(#28335086)
You can implement a linked list in safe Rust (even a doubly linked list if your prefer), there are a number of examples available if you google for it - for instance:
https://gist.github.com/matey-jack/3e19b6370c6f7036a9119b79a...
In fact, the Rust book explicitly mentions doubly linked lists when discussing Pin:
https://doc.rust-lang.org/std/pin/index.html#example-intrusi...
The ownership system might make it less trivial to implement, but the statement that you cannot implement it in safe Rust is incorrect regardless.