From daf0bc236df25c0e9f44bc3e30839c16cda3f638 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 11 Nov 2024 00:11:22 +0100 Subject: refactor(ecs): use same ID for entities & components --- ecs/src/archetype.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ecs/src/archetype.rs') diff --git a/ecs/src/archetype.rs b/ecs/src/archetype.rs index 808d006..5c104b7 100644 --- a/ecs/src/archetype.rs +++ b/ecs/src/archetype.rs @@ -1,10 +1,10 @@ use std::hash::{DefaultHasher, Hash, Hasher}; use crate::component::{ - Id as ComponentId, IsOptional as ComponentIsOptional, Metadata as ComponentMetadata, }; +use crate::uid::Uid; /// Archetype ID. #[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)] @@ -33,7 +33,7 @@ impl Id } /// Returns the ID of a archetype with the given components. - fn new(component_ids: impl IntoIterator) -> Self + fn new(component_ids: impl IntoIterator) -> Self { let mut hasher = DefaultHasher::new(); -- cgit v1.2.3-18-g5258