This commit is contained in:
LunarAkai 2025-08-12 16:36:47 +02:00
commit e2d5748733
41 changed files with 296 additions and 273 deletions

View file

@ -1,4 +1,7 @@
use crate::{entity, generational_index::{GenerationalIndex, GenerationalIndexAllocator}};
use crate::{
entity,
generational_index::{GenerationalIndex, GenerationalIndexAllocator},
};
#[derive(Debug, PartialEq, PartialOrd, Eq, Ord, Clone, Copy, Hash)]
pub struct Entity(GenerationalIndex);
@ -13,7 +16,6 @@ impl Entity {
}
}
#[derive(Debug, Clone)]
pub struct EntityAllocator(GenerationalIndexAllocator);
@ -33,4 +35,4 @@ impl EntityAllocator {
pub fn is_live(&self, entity: Entity) -> bool {
self.0.is_live(entity.0)
}
}
}