File tree Expand file tree Collapse file tree 7 files changed +11
-11
lines changed
Expand file tree Collapse file tree 7 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -1582,7 +1582,7 @@ mod tests {
15821582 app. add_systems ( EnterMainMenu , ( foo, bar) ) ;
15831583
15841584 app. world_mut ( ) . run_schedule ( EnterMainMenu ) ;
1585- assert_eq ! ( app. world( ) . num_entities ( ) , 2 ) ;
1585+ assert_eq ! ( app. world( ) . entity_count ( ) , 2 ) ;
15861586 }
15871587
15881588 #[ test]
Original file line number Diff line number Diff line change @@ -1637,7 +1637,7 @@ mod tests {
16371637
16381638 assert_eq ! ( q1. iter( & world) . len( ) , 1 ) ;
16391639 assert_eq ! ( q2. iter( & world) . len( ) , 1 ) ;
1640- assert_eq ! ( world. num_entities ( ) , 2 ) ;
1640+ assert_eq ! ( world. entity_count ( ) , 2 ) ;
16411641
16421642 world. clear_entities ( ) ;
16431643
@@ -1652,7 +1652,7 @@ mod tests {
16521652 "world should not contain sparse set components"
16531653 ) ;
16541654 assert_eq ! (
1655- world. num_entities ( ) ,
1655+ world. entity_count ( ) ,
16561656 0 ,
16571657 "world should not have any entities"
16581658 ) ;
Original file line number Diff line number Diff line change @@ -727,7 +727,7 @@ mod tests {
727727 world. spawn ( A ) . flush ( ) ;
728728 assert_eq ! ( vec![ "add_2" , "add_1" ] , world. resource:: <Order >( ) . 0 ) ;
729729 // Our A entity plus our two observers
730- assert_eq ! ( world. num_entities ( ) , 3 ) ;
730+ assert_eq ! ( world. entity_count ( ) , 3 ) ;
731731 }
732732
733733 #[ test]
Original file line number Diff line number Diff line change @@ -2342,7 +2342,7 @@ mod tests {
23422342 . spawn ( ( W ( 1u32 ) , W ( 2u64 ) ) )
23432343 . id ( ) ;
23442344 command_queue. apply ( & mut world) ;
2345- assert_eq ! ( world. num_entities ( ) , 1 ) ;
2345+ assert_eq ! ( world. entity_count ( ) , 1 ) ;
23462346 let results = world
23472347 . query :: < ( & W < u32 > , & W < u64 > ) > ( )
23482348 . iter ( & world)
Original file line number Diff line number Diff line change @@ -423,12 +423,12 @@ mod test {
423423 let mut world = World :: new ( ) ;
424424 queue. apply ( & mut world) ;
425425
426- assert_eq ! ( world. num_entities ( ) , 2 ) ;
426+ assert_eq ! ( world. entity_count ( ) , 2 ) ;
427427
428428 // The previous call to `apply` cleared the queue.
429429 // This call should do nothing.
430430 queue. apply ( & mut world) ;
431- assert_eq ! ( world. num_entities ( ) , 2 ) ;
431+ assert_eq ! ( world. entity_count ( ) , 2 ) ;
432432 }
433433
434434 #[ expect(
@@ -462,7 +462,7 @@ mod test {
462462 queue. push ( SpawnCommand ) ;
463463 queue. push ( SpawnCommand ) ;
464464 queue. apply ( & mut world) ;
465- assert_eq ! ( world. num_entities ( ) , 3 ) ;
465+ assert_eq ! ( world. entity_count ( ) , 3 ) ;
466466 }
467467
468468 #[ test]
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ impl World {
220220 ///
221221 /// This is helpful as a diagnostic, but it can also be used effectively in tests.
222222 #[ inline]
223- pub fn num_entities ( & self ) -> u32 {
223+ pub fn entity_count ( & self ) -> u32 {
224224 self . entities . len ( )
225225 }
226226
Original file line number Diff line number Diff line change @@ -535,12 +535,12 @@ pub fn extract_clusters(
535535 continue ;
536536 }
537537
538- let num_entities : usize = clusters
538+ let entity_count : usize = clusters
539539 . clusterable_objects
540540 . iter ( )
541541 . map ( |l| l. entities . len ( ) )
542542 . sum ( ) ;
543- let mut data = Vec :: with_capacity ( clusters. clusterable_objects . len ( ) + num_entities ) ;
543+ let mut data = Vec :: with_capacity ( clusters. clusterable_objects . len ( ) + entity_count ) ;
544544 for cluster_objects in & clusters. clusterable_objects {
545545 data. push ( ExtractedClusterableObjectElement :: ClusterHeader (
546546 cluster_objects. counts ,
You can’t perform that action at this time.
0 commit comments