summaryrefslogtreecommitdiff
path: root/ecs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs')
-rw-r--r--ecs/Cargo.toml1
-rw-r--r--ecs/src/component/storage.rs3
-rw-r--r--ecs/src/lib.rs3
-rw-r--r--ecs/src/query/options.rs3
-rw-r--r--ecs/src/system/stateful.rs2
5 files changed, 8 insertions, 4 deletions
diff --git a/ecs/Cargo.toml b/ecs/Cargo.toml
index 3bf3b19..68d74f9 100644
--- a/ecs/Cargo.toml
+++ b/ecs/Cargo.toml
@@ -12,6 +12,7 @@ paste = "1.0.14"
thiserror = "1.0.49"
tracing = { version = "0.1.39", optional = true }
linkme = "0.3.29"
+hashbrown = "0.15.2"
ecs-macros = { path = "../ecs-macros" }
util-macros = { path = "../util-macros" }
diff --git a/ecs/src/component/storage.rs b/ecs/src/component/storage.rs
index 54fa834..dcf0181 100644
--- a/ecs/src/component/storage.rs
+++ b/ecs/src/component/storage.rs
@@ -1,10 +1,11 @@
use std::any::type_name;
use std::borrow::Borrow;
use std::cell::RefCell;
-use std::collections::{HashMap, HashSet};
use std::slice::Iter as SliceIter;
use std::vec::IntoIter as OwnedVecIter;
+use hashbrown::{HashMap, HashSet};
+
use crate::archetype::Id as ArchetypeId;
use crate::component::{
Component,
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs
index 3926344..43a00f1 100644
--- a/ecs/src/lib.rs
+++ b/ecs/src/lib.rs
@@ -2,12 +2,13 @@
use std::any::{type_name, TypeId};
use std::cell::RefCell;
-use std::collections::HashMap;
use std::fmt::Debug;
use std::mem::ManuallyDrop;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
+use hashbrown::HashMap;
+
use crate::actions::Action;
use crate::component::storage::Storage as ComponentStorage;
use crate::component::{
diff --git a/ecs/src/query/options.rs b/ecs/src/query/options.rs
index ead0ac7..772d091 100644
--- a/ecs/src/query/options.rs
+++ b/ecs/src/query/options.rs
@@ -1,6 +1,7 @@
-use std::collections::HashSet;
use std::marker::PhantomData;
+use hashbrown::HashSet;
+
use crate::component::Component;
use crate::EntityComponent;
diff --git a/ecs/src/system/stateful.rs b/ecs/src/system/stateful.rs
index 5eae1da..80ac346 100644
--- a/ecs/src/system/stateful.rs
+++ b/ecs/src/system/stateful.rs
@@ -1,7 +1,7 @@
use std::any::{Any, TypeId};
-use std::collections::HashMap;
use std::panic::{RefUnwindSafe, UnwindSafe};
+use hashbrown::HashMap;
use seq_macro::seq;
use crate::component::Component;