Amanieu / intrusive-rs

Intrusive collections for Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is_linked is badly named

przygienda opened this issue · comments

it only checks next (even in doubly linked case).

this would be more logical has_successor or something like this

there is now no real method to figure out whether a node is really linked onto the list on not on it.

next contains UNLINKED_MARKER if the node is unlinked, whereas it contains 0/null when there is no next element in the list. is_linked will correctly return false for the last element in a list.

I don't understand what the problem is: is_linked tells you whether a node is linked into a list. It does not tell you whether there is another node before/after this one.