Skip to content

ChildBuilder methods should take IntoIterator, rather than a slice type #7229

@alice-i-cecile

Description

@alice-i-cecile
          It's generally better to use an iterator type instead of forcing someone to use a `slice`. Since it's not always guaranteed that the children entities will be in an array-like container.
    fn replace_children(&mut self, children: impl IntoIterator<Item = Entity>) -> &mut Self {

Originally posted by @NathanSWard in #6035 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions