Re: [PATCH RFC 1/4] rust: clist: Add abstraction for iterating over C linked lists

Danilo Krummrich
2025-11-04T13:49:47Z

On 11/1/25 4:51 AM, Alexandre Courbot wrote:
> I am wondering whether `CList` serves an actual purpose beyond providing
> ` CListIter` to iterate on... Would it make sense to merge both types
> into a single one that implements `Iterator`?

I think eventually we will have a bunch of iterator types, e.g for
list_for_each_entry_{safe,reverse,continue}() etc. (see also [1]).

Hence, CList has to provide a couple of methods providing different iterator types.

[1] https://lore.kernel.org/lkml/DDVYV1VT441A.11L5C11F8R7C9@kernel.org/