summaryrefslogtreecommitdiff
path: root/ecs/src/component/storage.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/component/storage.rs')
-rw-r--r--ecs/src/component/storage.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/ecs/src/component/storage.rs b/ecs/src/component/storage.rs
index b68f89d..f2306b7 100644
--- a/ecs/src/component/storage.rs
+++ b/ecs/src/component/storage.rs
@@ -161,7 +161,7 @@ impl Storage
.archetype()
.has_component_with_id(component.self_id())
{
- return Err(Error::EntityAlreadyHasComponent {
+ return Err(Error::ComponentAlreadyInEntity {
entity: entity_uid,
component: component.self_id(),
});
@@ -254,7 +254,7 @@ impl Storage
.archetype()
.has_component_with_id(component_id)
{
- return Err(Error::EntityDoesNotHaveComponent {
+ return Err(Error::ComponentNotFoundInEntity {
entity: entity_uid,
component: component_id,
});
@@ -452,7 +452,7 @@ impl<'component_storage> Iterator for ArchetypeRefIter<'component_storage>
self.dfs_iter.push((
BorrowedOrOwned::Owned(Archetype::new(
add_edge_archetype_id,
- &add_edge_archetype_comps
+ add_edge_archetype_comps
.iter()
.map(|metadata| metadata.id)
.collect::<Vec<_>>(),
@@ -476,7 +476,7 @@ impl<'component_storage> Iterator for ArchetypeRefIter<'component_storage>
}
}
-impl<'storage> ArchetypeRefIter<'storage>
+impl ArchetypeRefIter<'_>
{
fn find_edges_of_imaginary_archetype(
&self,
@@ -484,7 +484,7 @@ impl<'storage> ArchetypeRefIter<'storage>
) -> Vec<(Uid, ArchetypeEdges)>
{
self.storage
- .find_all_archetype_with_comps(&imaginary_archetype_comps)
+ .find_all_archetype_with_comps(imaginary_archetype_comps)
.into_iter()
.filter_map(|found_id| {
let found_archetype = self.storage.get_archetype_by_id(found_id).unwrap();
@@ -531,13 +531,13 @@ pub enum Error
EntityDoesNotExist(Uid),
#[error("Entity with ID {entity:?} already has component with ID {component:?}")]
- EntityAlreadyHasComponent
+ ComponentAlreadyInEntity
{
entity: Uid, component: Uid
},
#[error("Entity with ID {entity:?} does not have component with ID {component:?}")]
- EntityDoesNotHaveComponent
+ ComponentNotFoundInEntity
{
entity: Uid, component: Uid
},