May 2019
Intermediate to advanced
698 pages
17h 21m
English
Doubly linked lists are in many cases improved versions (and the default) over regular linked lists, thanks to the better flexibility at the cost of a single pointer per node and slightly more complex operations.
In particular, by keeping the code safe (in Rust terms, so no unsafe {} was used), the code gets riddled with RefCells and borrow() to create a data structure that the borrow checker is auditing at runtime. Looking at the Rust source code for LinkedList, this is not the case there (more on that in Chapter 17, Collections in Rust). The basic structure is similar, but the operations use a bunch of unsafe code underneath—something that requires a good experience writing Rust.
Read now
Unlock full access