From 9711fe68450339821da708558cc3363c658951d4 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 11 Nov 2024 12:05:44 +0700 Subject: [PATCH] Use `hashbrown` for `FlecsIdMap` (#206) This removes a dependency on `fxhash` and uses `hashbrown` which now defaults to `foldhash`. `fxhash` hasn't been updated / maintained in 7 years and the Rust community has largely moved on to other hash algorithms over time. (This is also more friendly for future potential `no_std` support.) --- flecs_ecs/Cargo.toml | 2 +- flecs_ecs/src/core/world.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flecs_ecs/Cargo.toml b/flecs_ecs/Cargo.toml index c8ce7218..52bf4596 100644 --- a/flecs_ecs/Cargo.toml +++ b/flecs_ecs/Cargo.toml @@ -25,7 +25,7 @@ flecs_ecs_derive = { workspace = true } flecs_ecs_sys = { workspace = true } bitflags = "2.6.0" compact_str = "0.8.0" -fxhash = "0.2.1" +hashbrown = "0.15.0" # used for backtraces upon hardware exceptions during test # only used when "test-with-crash-handler" feature enabled diff --git a/flecs_ecs/src/core/world.rs b/flecs_ecs/src/core/world.rs index 45313bcb..f996a27f 100644 --- a/flecs_ecs/src/core/world.rs +++ b/flecs_ecs/src/core/world.rs @@ -51,7 +51,7 @@ impl Clone for World { } } -pub(crate) type FlecsIdMap = std::collections::HashMap; +pub(crate) type FlecsIdMap = hashbrown::HashMap; unsafe impl Send for World {}