Hacker News new | ask | show | jobs
by CJefferson 2528 days ago
OK, perhaps we should say a doubly-linked list where each node contains the data and two pointers. While this is safe, it's also fairly inefficient, storing an extra counter with every node, which are dynamically updated, just to keep the borrow checker happy.
1 comments

The word you're looking for is "intrusive".
Nope, intrusive is different. Because this is using an Rc (reference counted pointer) for the forward and backward pointers, these counters are both set to '2', as (almost) everything in a doubly-linked list has two things pointing to it, the thing after and the thing before.
I'm saying you're asking for intrusive ("each node contains the data and two pointers") whereas this list is not intrusive.