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/query.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ecs/src/query.rs') diff --git a/ecs/src/query.rs b/ecs/src/query.rs index e7fd7a6..69bb35d 100644 --- a/ecs/src/query.rs +++ b/ecs/src/query.rs @@ -15,7 +15,6 @@ use crate::component::{ Metadata as ComponentMetadata, Sequence as ComponentSequence, }; -use crate::entity::Uid as EntityUid; use crate::lock::{ReadGuard, WriteGuard}; use crate::query::options::Options; use crate::system::{ @@ -23,6 +22,7 @@ use crate::system::{ Param as SystemParam, System, }; +use crate::uid::Uid; use crate::{EntityComponent, World}; pub mod options; @@ -86,7 +86,7 @@ where /// Returns the UID of the entity at the given query iteration index. #[must_use] - pub fn entity_uid(&self, entity_index: usize) -> Option + pub fn get_entity_uid(&self, entity_index: usize) -> Option { Some( self.component_storage -- cgit v1.2.3-18-g5258