Grow the list by inserting `count` elements at `index`. The new elements are not initialized, they will contain whatever happened to be in memory. Since the memory comes from the pool, this will be either zero entity references or whatever where in a previously deallocated list.
(&mut self, index: usize, count: usize, pool: &mut ListPool<T>)
| 631 | /// Since the memory comes from the pool, this will be either zero entity references or |
| 632 | /// whatever where in a previously deallocated list. |
| 633 | pub fn grow_at(&mut self, index: usize, count: usize, pool: &mut ListPool<T>) { |
| 634 | let data = self.grow(count, pool); |
| 635 | |
| 636 | // Copy elements after `index` up. |
| 637 | for i in (index + count..data.len()).rev() { |
| 638 | data[i] = data[i - count]; |
| 639 | } |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | #[cfg(test)] |