Skip to content

outer_iterator_mut does not implement DoubleEndedIterator correctly #261

Description

@mulimoen

outer_iterator_mut uses a successive application of split_at_mut. The iterator is such not double-ended, and will fail when trying to iterate backwards on it. The code for this can be seen at https://github.com/mulimoen/sprs/tree/bug/outer_iterator_mut, see the actions page at https://github.com/mulimoen/sprs/actions/runs/436352486 for the error message.

How to fix: We probably need to sprinkle a bit of unsafe here to be able to move self.data into the closure, and make it independent of iteration order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions