@@ -1586,7 +1586,7 @@ impl World {
1586
1586
) -> Option < ( Ptr < ' _ > , TickCells < ' _ > ) > {
1587
1587
match storage_type {
1588
1588
StorageType :: Table => {
1589
- let ( components, table_row) = fetch_table ( self , location, component_id) ?;
1589
+ let ( components, table_row) = self . fetch_table ( location, component_id) ?;
1590
1590
1591
1591
// SAFETY: archetypes only store valid table_rows and caller ensure aliasing rules
1592
1592
Some ( (
@@ -1597,7 +1597,7 @@ impl World {
1597
1597
} ,
1598
1598
) )
1599
1599
}
1600
- StorageType :: SparseSet => fetch_sparse_set ( self , component_id) ?. get_with_ticks ( entity) ,
1600
+ StorageType :: SparseSet => self . fetch_sparse_set ( component_id) ?. get_with_ticks ( entity) ,
1601
1601
}
1602
1602
}
1603
1603
@@ -1640,11 +1640,11 @@ impl World {
1640
1640
// SAFETY: component_id exists and is therefore valid
1641
1641
match storage_type {
1642
1642
StorageType :: Table => {
1643
- let ( components, table_row) = fetch_table ( self , location, component_id) ?;
1643
+ let ( components, table_row) = self . fetch_table ( location, component_id) ?;
1644
1644
// SAFETY: archetypes only store valid table_rows and caller ensure aliasing rules
1645
1645
Some ( components. get_data_unchecked ( table_row) )
1646
1646
}
1647
- StorageType :: SparseSet => fetch_sparse_set ( self , component_id) ?. get ( entity) ,
1647
+ StorageType :: SparseSet => self . fetch_sparse_set ( component_id) ?. get ( entity) ,
1648
1648
}
1649
1649
}
1650
1650
@@ -1686,31 +1686,31 @@ impl World {
1686
1686
) -> Option < ComponentTicks > {
1687
1687
match storage_type {
1688
1688
StorageType :: Table => {
1689
- let ( components, table_row) = fetch_table ( self , location, component_id) ?;
1689
+ let ( components, table_row) = self . fetch_table ( location, component_id) ?;
1690
1690
// SAFETY: archetypes only store valid table_rows and caller ensure aliasing rules
1691
1691
Some ( components. get_ticks_unchecked ( table_row) )
1692
1692
}
1693
- StorageType :: SparseSet => fetch_sparse_set ( self , component_id) ?. get_ticks ( entity) ,
1693
+ StorageType :: SparseSet => self . fetch_sparse_set ( component_id) ?. get_ticks ( entity) ,
1694
1694
}
1695
1695
}
1696
- }
1697
1696
1698
- #[ inline]
1699
- unsafe fn fetch_table (
1700
- world : & World ,
1701
- location : EntityLocation ,
1702
- component_id : ComponentId ,
1703
- ) -> Option < ( & Column , TableRow ) > {
1704
- let archetype = & world . archetypes [ location. archetype_id ] ;
1705
- let table = & world . storages . tables [ archetype. table_id ( ) ] ;
1706
- let components = table. get_column ( component_id) ?;
1707
- let table_row = archetype. entity_table_row ( location. archetype_row ) ;
1708
- Some ( ( components, table_row) )
1709
- }
1697
+ #[ inline]
1698
+ unsafe fn fetch_table (
1699
+ & self ,
1700
+ location : EntityLocation ,
1701
+ component_id : ComponentId ,
1702
+ ) -> Option < ( & Column , TableRow ) > {
1703
+ let archetype = & self . archetypes [ location. archetype_id ] ;
1704
+ let table = & self . storages . tables [ archetype. table_id ( ) ] ;
1705
+ let components = table. get_column ( component_id) ?;
1706
+ let table_row = archetype. entity_table_row ( location. archetype_row ) ;
1707
+ Some ( ( components, table_row) )
1708
+ }
1710
1709
1711
- #[ inline]
1712
- fn fetch_sparse_set ( world : & World , component_id : ComponentId ) -> Option < & ComponentSparseSet > {
1713
- world. storages . sparse_sets . get ( component_id)
1710
+ #[ inline]
1711
+ fn fetch_sparse_set ( & self , component_id : ComponentId ) -> Option < & ComponentSparseSet > {
1712
+ self . storages . sparse_sets . get ( component_id)
1713
+ }
1714
1714
}
1715
1715
1716
1716
impl fmt:: Debug for World {
0 commit comments