pub unsafe fn move_to_and_forget_missing_unchecked(
        &mut self,
        row: usize,
        new_table: &mut Table,
    ) -> TableMoveResult {
        debug_assert!(row < self.len());
        let is_last = row == self.entities.len() - 1;
        let new_row = new_table.allocate(self.entities.swap_remove(row));
        for column in self.columns.values_mut() {
            let (data, ticks) = column.swap_remove_and_forget_unchecked(row);
            if let Some(new_column) = new_table.get_column_mut(column.component_id) {
                new_column.set_unchecked(new_row, data);
                *new_column.get_ticks_unchecked_mut(new_row) = ticks;
            }
        }
        TableMoveResult {
            new_row,
            swapped_entity: if is_last {
                None
            } else {
                Some(self.entities[row])
            },
        }
    }
/// Moves the `row` column values to `new_table`, for the columns shared between both tables.
/// Returns the index of the new row in `new_table` and the entity in this table swapped in
/// to replace it (if an entity was swapped in). missing columns will be "forgotten". It is
/// the caller's responsibility to drop them
///
/// # Safety
/// Row must be in-bounds
Moves the `row` column values to `new_table`, for the columns shared between both tables.
Returns the index of the new row in `new_table` and the entity in this table swapped in
to replace it (if an entity was swapped in). missing columns will be "forgotten". It is
the caller's responsibility to drop them
Moves the ` row ` column values to ` new_table ` for the columns shared between both tables . Returns the index of the new row in ` new_table ` and the entity in this table swapped in to replace it ( if an entity was swapped in ) . missing columns will be " forgotten " . It is the caller ' s responsibility to drop them
pub unsafe fn move_to_and_forget_missing_unchecked(
        &mut self,
        row: usize,
        new_table: &mut Table,
    ) -> TableMoveResult {
        debug_assert!(row < self.len());
        let is_last = row == self.entities.len() - 1;
        let new_row = new_table.allocate(self.entities.swap_remove(row));
        for column in self.columns.values_mut() {
            let (data, ticks) = column.swap_remove_and_forget_unchecked(row);
            if let Some(new_column) = new_table.get_column_mut(column.component_id) {
                new_column.set_unchecked(new_row, data);
                *new_column.get_ticks_unchecked_mut(new_row) = ticks;
            }
        }
        TableMoveResult {
            new_row,
            swapped_entity: if is_last {
                None
            } else {
                Some(self.entities[row])
            },
        }
    }
pub unsafe fn move_to_and_forget_missing_unchecked ( & mut self , row : usize , new_table : & mut Table , ) -> TableMoveResult { debug_assert ! ( row self len ( ) ) ; let is_last = row == self . entities . len ( ) - 1 ; let new_row = new_table . allocate ( self . entities . swap_remove ( row ) ) ; for column in self . columns . values_mut ( ) { let ( data , ticks ) = column . swap_remove_and_forget_unchecked ( row ) ; if let Some ( new_column ) = new_table . get_column_mut ( column . component_id ) { new_column . set_unchecked ( new_row , data ) ; * new_column . get_ticks_unchecked_mut ( new_row ) = ticks ; } } TableMoveResult { new_row , swapped_entity : if is_last { None } else { Some ( self . entities [ row ] ) } , } }
Moves the `row` column values to `new_table`, for the columns shared between both tables.
Moves the ` row ` column values to ` new_table ` for the columns shared between both tables .
&mut self
row
usize
new_table
&mut Table
&mut self
row
usize
new_table
&mut Table
safety
Row must be in-bounds
Row must be in - bounds