Skip to content

QueryCombinationIter should not implement ExactSizeIterator #5846

Closed
@nicopap

Description

@nicopap

Bevy version

QueryCombinationIter can very easily have a length greater than usize::MAX, therefore shouldn't implement ExactSizeIterator.

Know length iterators with potential greater-than-usize::MAX length in std::iter and itertools do not implement ExactSizeIterator, because the value of len cannot be accurate if the length exceeds usize. (iter::Repeat, iter::Intersperse, itertools::Product, itertools::Combinations do not implement ExactSizeIterator)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorC-Code-QualityA section of code that is hard to understand or changeD-TrivialNice and easy! A great choice to get started with BevyM-Needs-Migration-GuideA breaking change to Bevy's public API that needs to be noted in a migration guide

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions