summaryrefslogtreecommitdiff
path: root/ecs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs')
-rw-r--r--ecs/src/component.rs2
-rw-r--r--ecs/src/component/storage.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/ecs/src/component.rs b/ecs/src/component.rs
index 513b31a..14d3b54 100644
--- a/ecs/src/component.rs
+++ b/ecs/src/component.rs
@@ -187,7 +187,7 @@ pub struct Metadata
impl Metadata
{
- pub fn of<ComponentT: Component + ?Sized>(component: &ComponentT) -> Self
+ pub fn get<ComponentT: Component + ?Sized>(component: &ComponentT) -> Self
{
Self {
id: component.self_id(),
diff --git a/ecs/src/component/storage.rs b/ecs/src/component/storage.rs
index c407192..ffd682e 100644
--- a/ecs/src/component/storage.rs
+++ b/ecs/src/component/storage.rs
@@ -105,14 +105,14 @@ impl Storage
let archetype_id = ArchetypeId::from_components_metadata(
&components
.iter()
- .map(|component| ComponentMetadata::of(&**component))
+ .map(|component| ComponentMetadata::get(&**component))
.collect::<Vec<_>>(),
);
let comp_ids_set = create_non_opt_component_id_set(
components
.iter()
- .map(|component| ComponentMetadata::of(&**component)),
+ .map(|component| ComponentMetadata::get(&**component)),
);
let archetype_index =