From 2cb12d0c8bb889b481b5a80e7d79397aef20adf5 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sat, 19 Apr 2025 14:29:02 +0300 Subject: [PATCH] Remove HashMap workarounds During the migration to 0.16, I added a few workarounds related to `hashbrown` to make the code compile. These issues have been fixed in the latest Bevy RC: https://github.com/bevyengine/bevy/pull/18694 So we can now remove those workarounds. --- bevy_replicon_example_backend/examples/tic_tac_toe.rs | 2 +- src/shared/replication/command_markers.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bevy_replicon_example_backend/examples/tic_tac_toe.rs b/bevy_replicon_example_backend/examples/tic_tac_toe.rs index f73063ec..b4835899 100644 --- a/bevy_replicon_example_backend/examples/tic_tac_toe.rs +++ b/bevy_replicon_example_backend/examples/tic_tac_toe.rs @@ -307,7 +307,7 @@ fn init_symbols( /// /// Used only for client. fn client_start(mut commands: Commands, cells: Query<(Entity, &Cell)>) { - let mut entities = HashMap::default(); + let mut entities = HashMap::new(); for (entity, cell) in &cells { entities.insert(cell.index, entity); } diff --git a/src/shared/replication/command_markers.rs b/src/shared/replication/command_markers.rs index 9e303866..16a401d8 100644 --- a/src/shared/replication/command_markers.rs +++ b/src/shared/replication/command_markers.rs @@ -91,7 +91,7 @@ pub trait AppMarkerExt { } else { ctx.commands .entity(entity.id()) - .insert(History([(ctx.message_tick, component)].into_iter().collect())); + .insert(History([(ctx.message_tick, component)].into())); } Ok(())