From 2e6f840e9e4a41679c1c7e91e556718023d689c7 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Fri, 7 Jun 2024 19:47:17 +0300 Subject: [PATCH] Minor stylistic changes Just a few spaces and an intermediate veriable to make the code look a little bit nicer. --- src/core/replication_rules.rs | 2 ++ tests/changes.rs | 1 + tests/removal.rs | 1 + tests/server_event.rs | 6 ++---- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/replication_rules.rs b/src/core/replication_rules.rs index 901c1dc6..927a9498 100644 --- a/src/core/replication_rules.rs +++ b/src/core/replication_rules.rs @@ -174,6 +174,7 @@ impl AppRuleExt for App { self.world_mut() .resource_mut::() .insert(rule); + self } @@ -187,6 +188,7 @@ impl AppRuleExt for App { self.world_mut() .resource_mut::() .insert(rule); + self } } diff --git a/tests/changes.rs b/tests/changes.rs index 84b01be9..ccc17372 100644 --- a/tests/changes.rs +++ b/tests/changes.rs @@ -469,6 +469,7 @@ fn marker_with_history_old_update() { .world() .get::(client_entity) .unwrap(); + assert_eq!( history.0, [false], diff --git a/tests/removal.rs b/tests/removal.rs index 6eb73f80..fbcec426 100644 --- a/tests/removal.rs +++ b/tests/removal.rs @@ -128,6 +128,7 @@ fn marker() { .world_mut() .spawn((Replicated, OriginalComponent)) .id(); + let client_entity = client_app.world_mut().spawn(ReplaceMarker).id(); let client = client_app.world().resource::(); diff --git a/tests/server_event.rs b/tests/server_event.rs index 6a4a3e22..d9a60567 100644 --- a/tests/server_event.rs +++ b/tests/server_event.rs @@ -198,10 +198,8 @@ fn event_queue() { server_app.exchange_with_client(&mut client_app); client_app.update(); - assert!(client_app - .world() - .resource::>() - .is_empty()); + let events = client_app.world().resource::>(); + assert!(events.is_empty()); // Restore the init tick to receive the event. *client_app.world_mut().resource_mut::() = previous_tick;