Skip to content

Commit 62da22d

Browse files
remove comments referring to type when untyped pointer is returned
1 parent dd4add3 commit 62da22d

File tree

1 file changed

+4
-4
lines changed
  • crates/bevy_ecs/src/storage

1 file changed

+4
-4
lines changed

crates/bevy_ecs/src/storage/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl Storages {
7070
let table = &self.tables[archetype.table_id()];
7171
let components = table.get_column(component_id)?;
7272
let table_row = archetype.entity_table_row(location.index);
73-
// SAFETY: archetypes only store valid table_rows and the stored component type is T
73+
// SAFETY: archetypes only store valid table_rows and caller ensure aliasing rules
7474
Some(unsafe {
7575
(
7676
components.get_data_unchecked(table_row),
@@ -131,7 +131,7 @@ impl Storages {
131131
let table = &self.tables[archetype.table_id()];
132132
let components = table.get_column(component_id)?;
133133
let table_row = archetype.entity_table_row(location.index);
134-
// SAFETY: archetypes only store valid table_rows and the stored component type is T
134+
// SAFETY: archetypes only store valid table_rows and caller ensure aliasing rules
135135
Some(unsafe { components.get_data_unchecked(table_row) })
136136
}
137137
StorageType::SparseSet => self
@@ -187,7 +187,7 @@ impl Storages {
187187
let table = &self.tables[archetype.table_id()];
188188
let components = table.get_column(component_id)?;
189189
let table_row = archetype.entity_table_row(location.index);
190-
// SAFETY: archetypes only store valid table_rows and the stored component type is T
190+
// SAFETY: archetypes only store valid table_rows and caller ensure aliasing rules
191191
Some(unsafe { components.get_ticks_unchecked(table_row) })
192192
}
193193
StorageType::SparseSet => self
@@ -230,7 +230,7 @@ impl Storages {
230230
// SAFETY: archetypes will always point to valid columns
231231
let components = table.get_column_mut(component_id).unwrap();
232232
let table_row = archetype.entity_table_row(location.index);
233-
// SAFETY: archetypes only store valid table_rows and the stored component type is T
233+
// SAFETY: archetypes only store valid table_rows
234234
// SAFETY: promote is safe because the caller promises to remove the table row without dropping it immediately afterwards
235235
components.get_data_unchecked_mut(table_row).promote()
236236
}

0 commit comments

Comments
 (0)