Skip to content

chunk like Iterators should panic on overflow #51254

@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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions