|
|
|
|
|
by quodlibetor
3037 days ago
|
|
Linked lists are in the standard library[1]. The source code is linked to from that page (`src`, on the top-right corner), although the implementation is optimized so it's probably not a great learning resource. If, for some reason, you actually need a linked list there are tons of implementations available on crates.io[2]. It's not that there aren't linked lists, and it's not that they can't be implemented as efficiently as in C, it's that implementing them is an inherently tricky problem where the obvious implementation can't be proved by Rust's type system so they're an extremely unpleasant way to learn Rust. 1: https://doc.rust-lang.org/std/collections/struct.LinkedList....
2: https://crates.io/search?q=linked%20list |
|