@@ -1800,7 +1800,7 @@ impl World {
1800
1800
) -> Option < ( Ptr < ' _ > , TickCells < ' _ > ) > {
1801
1801
match storage_type {
1802
1802
StorageType :: Table => {
1803
- let ( components, table_row) = fetch_table ( self , location, component_id) ?;
1803
+ let ( components, table_row) = self . fetch_table ( location, component_id) ?;
1804
1804
1805
1805
// SAFETY: archetypes only store valid table_rows and caller ensure aliasing rules
1806
1806
Some ( (
@@ -1811,7 +1811,7 @@ impl World {
1811
1811
} ,
1812
1812
) )
1813
1813
}
1814
- StorageType :: SparseSet => fetch_sparse_set ( self , component_id) ?. get_with_ticks ( entity) ,
1814
+ StorageType :: SparseSet => self . fetch_sparse_set ( component_id) ?. get_with_ticks ( entity) ,
1815
1815
}
1816
1816
}
1817
1817
@@ -1854,11 +1854,11 @@ impl World {
1854
1854
// SAFETY: component_id exists and is therefore valid
1855
1855
match storage_type {
1856
1856
StorageType :: Table => {
1857
- let ( components, table_row) = fetch_table ( self , location, component_id) ?;
1857
+ let ( components, table_row) = self . fetch_table ( location, component_id) ?;
1858
1858
// SAFETY: archetypes only store valid table_rows and caller ensure aliasing rules
1859
1859
Some ( components. get_data_unchecked ( table_row) )
1860
1860
}
1861
- StorageType :: SparseSet => fetch_sparse_set ( self , component_id) ?. get ( entity) ,
1861
+ StorageType :: SparseSet => self . fetch_sparse_set ( component_id) ?. get ( entity) ,
1862
1862
}
1863
1863
}
1864
1864
@@ -1900,31 +1900,31 @@ impl World {
1900
1900
) -> Option < ComponentTicks > {
1901
1901
match storage_type {
1902
1902
StorageType :: Table => {
1903
- let ( components, table_row) = fetch_table ( self , location, component_id) ?;
1903
+ let ( components, table_row) = self . fetch_table ( location, component_id) ?;
1904
1904
// SAFETY: archetypes only store valid table_rows and caller ensure aliasing rules
1905
1905
Some ( components. get_ticks_unchecked ( table_row) )
1906
1906
}
1907
- StorageType :: SparseSet => fetch_sparse_set ( self , component_id) ?. get_ticks ( entity) ,
1907
+ StorageType :: SparseSet => self . fetch_sparse_set ( component_id) ?. get_ticks ( entity) ,
1908
1908
}
1909
1909
}
1910
- }
1911
1910
1912
- #[ inline]
1913
- unsafe fn fetch_table (
1914
- world : & World ,
1915
- location : EntityLocation ,
1916
- component_id : ComponentId ,
1917
- ) -> Option < ( & Column , TableRow ) > {
1918
- let archetype = & world . archetypes [ location. archetype_id ] ;
1919
- let table = & world . storages . tables [ archetype. table_id ( ) ] ;
1920
- let components = table. get_column ( component_id) ?;
1921
- let table_row = archetype. entity_table_row ( location. archetype_row ) ;
1922
- Some ( ( components, table_row) )
1923
- }
1911
+ #[ inline]
1912
+ unsafe fn fetch_table (
1913
+ & self ,
1914
+ location : EntityLocation ,
1915
+ component_id : ComponentId ,
1916
+ ) -> Option < ( & Column , TableRow ) > {
1917
+ let archetype = & self . archetypes [ location. archetype_id ] ;
1918
+ let table = & self . storages . tables [ archetype. table_id ( ) ] ;
1919
+ let components = table. get_column ( component_id) ?;
1920
+ let table_row = archetype. entity_table_row ( location. archetype_row ) ;
1921
+ Some ( ( components, table_row) )
1922
+ }
1924
1923
1925
- #[ inline]
1926
- fn fetch_sparse_set ( world : & World , component_id : ComponentId ) -> Option < & ComponentSparseSet > {
1927
- world. storages . sparse_sets . get ( component_id)
1924
+ #[ inline]
1925
+ fn fetch_sparse_set ( & self , component_id : ComponentId ) -> Option < & ComponentSparseSet > {
1926
+ self . storages . sparse_sets . get ( component_id)
1927
+ }
1928
1928
}
1929
1929
1930
1930
impl fmt:: Debug for World {
0 commit comments