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 @@ -1640,7 +1640,7 @@ mod tests {
16401640
16411641 assert_eq ! ( q1. iter( & world) . len( ) , 1 ) ;
16421642 assert_eq ! ( q2. iter( & world) . len( ) , 1 ) ;
1643- assert_eq ! ( world. num_entities ( ) , 2 ) ;
1643+ assert_eq ! ( world. entity_count ( ) , 2 ) ;
16441644
16451645 world. clear_entities ( ) ;
16461646
@@ -1655,7 +1655,7 @@ mod tests {
16551655 "world should not contain sparse set components"
16561656 ) ;
16571657 assert_eq ! (
1658- world. num_entities ( ) ,
1658+ world. entity_count ( ) ,
16591659 0 ,
16601660 "world should not have any entities"
16611661 ) ;
Original file line number Diff line number Diff line change @@ -728,7 +728,7 @@ mod tests {
728728 world. spawn ( A ) . flush ( ) ;
729729 assert_eq ! ( vec![ "add_2" , "add_1" ] , world. resource:: <Order >( ) . 0 ) ;
730730 // Our A entity plus our two observers
731- assert_eq ! ( world. num_entities ( ) , 3 ) ;
731+ assert_eq ! ( world. entity_count ( ) , 3 ) ;
732732 }
733733
734734 #[ test]
Original file line number Diff line number Diff line change @@ -2343,7 +2343,7 @@ mod tests {
23432343 . spawn ( ( W ( 1u32 ) , W ( 2u64 ) ) )
23442344 . id ( ) ;
23452345 command_queue. apply ( & mut world) ;
2346- assert_eq ! ( world. num_entities ( ) , 1 ) ;
2346+ assert_eq ! ( world. entity_count ( ) , 1 ) ;
23472347 let results = world
23482348 . query :: < ( & W < u32 > , & W < u64 > ) > ( )
23492349 . iter ( & world)
Original file line number Diff line number Diff line change @@ -424,12 +424,12 @@ mod test {
424424 let num_resources = world. components ( ) . num_resources ( ) as u32 ;
425425 queue. apply ( & mut world) ;
426426
427- assert_eq ! ( world. num_entities ( ) , 2 ) ;
427+ assert_eq ! ( world. entity_count ( ) , 2 ) ;
428428
429429 // The previous call to `apply` cleared the queue.
430430 // This call should do nothing.
431431 queue. apply ( & mut world) ;
432- assert_eq ! ( world. num_entities ( ) , 2 ) ;
432+ assert_eq ! ( world. entity_count ( ) , 2 ) ;
433433 }
434434
435435 #[ expect(
@@ -464,7 +464,7 @@ mod test {
464464 queue. push ( SpawnCommand ) ;
465465 queue. push ( SpawnCommand ) ;
466466 queue. apply ( & mut world) ;
467- assert_eq ! ( world. num_entities ( ) , 3 ) ;
467+ assert_eq ! ( world. entity_count ( ) , 3 ) ;
468468 }
469469
470470 #[ test]
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ impl World {
222222 ///
223223 /// This is helpful as a diagnostic, but it can also be used effectively in tests.
224224 #[ inline]
225- pub fn num_entities ( & self ) -> u32 {
225+ pub fn entity_count ( & self ) -> u32 {
226226 self . entities . len ( )
227227 }
228228
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