From 3cbbfa9244b12f73d3408e7a9afd038a51b321c9 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Tue, 16 Apr 2024 02:42:33 +0300 Subject: [PATCH] Remove extra `Replication` insert [skip ci] (#231) * Remove extra `Replication` insert Was present even before refactoring in the `insertion` test, but after splitting it into multiple tests I noticed that it not needed, all entities already spawned with this component. * Rename for consistency --- tests/insertion.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/insertion.rs b/tests/insertion.rs index 818f7ba3..325d5942 100644 --- a/tests/insertion.rs +++ b/tests/insertion.rs @@ -31,7 +31,7 @@ fn table_storage() { server_app .world .entity_mut(server_entity) - .insert((Replication, TableComponent)); + .insert(TableComponent); server_app.update(); server_app.exchange_with_client(&mut client_app); @@ -70,7 +70,7 @@ fn sparse_set_storage() { server_app .world .entity_mut(server_entity) - .insert((Replication, SparseSetComponent)); + .insert(SparseSetComponent); server_app.update(); server_app.exchange_with_client(&mut client_app); @@ -119,7 +119,7 @@ fn mapped_existing_entity() { server_app .world .entity_mut(server_entity) - .insert((Replication, MappedComponent(server_map_entity))); + .insert(MappedComponent(server_map_entity)); server_app.update(); server_app.exchange_with_client(&mut client_app); @@ -163,7 +163,7 @@ fn mapped_new_entity() { server_app .world .entity_mut(server_entity) - .insert((Replication, MappedComponent(server_map_entity))); + .insert(MappedComponent(server_map_entity)); server_app.update(); server_app.exchange_with_client(&mut client_app); @@ -204,7 +204,7 @@ fn group() { server_app .world .entity_mut(server_entity) - .insert((Replication, (GroupComponentA, GroupComponentB))); + .insert((GroupComponentA, GroupComponentB)); server_app.update(); server_app.exchange_with_client(&mut client_app); @@ -242,18 +242,18 @@ fn not_replicated() { server_app .world .entity_mut(server_entity) - .insert((Replication, NotReplicatedComponent)); + .insert(NotReplicatedComponent); server_app.update(); server_app.exchange_with_client(&mut client_app); client_app.update(); - let non_replicated_components = client_app + let not_replicated_components = client_app .world .query_filtered::<(), With>() .iter(&client_app.world) .count(); - assert_eq!(non_replicated_components, 0); + assert_eq!(not_replicated_components, 0); } #[test]