ChildBuilder methods should take IntoIterator, rather than a slice type
Open
C-Usability
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
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.
```suggestion
fn replace_children(&mut self, children: impl IntoIterator) -> &mut Self {
```
_Originally posted by @NathanSWard in https://github.com/bevyengine/bevy/pull/6035#discussion_r981546329_
Contributor guide
Assessment
This issue has not been assessed yet.