Skip to content

chunk like Iterators should panic on overflow #51254

Closed
@Kerollmops

Description

@Kerollmops

Currently the Chunks, ChunksMut, ExactChunks and ExactChunksMut adapters does return None if an overflow occur in the Iterator::nth method.

I think this is not a good thing to have a silent "error", we must be consistent with other iterator adapters like enumerate and panic if an overflow is detected.

This has been talked in the tracking issue of the ExactChunks/Mut iterators adapters.

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