summaryrefslogtreecommitdiff
path: root/ecs/src/component/local.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/component/local.rs')
-rw-r--r--ecs/src/component/local.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/ecs/src/component/local.rs b/ecs/src/component/local.rs
index 20627bf..0f6f641 100644
--- a/ecs/src/component/local.rs
+++ b/ecs/src/component/local.rs
@@ -1,21 +1,20 @@
use std::ops::{Deref, DerefMut};
-use crate::component::Component;
-use crate::system::{ComponentRefMut, Param as SystemParam, System};
+use crate::component::{Component, HandleMut as ComponentHandleMut};
+use crate::system::{Param as SystemParam, System};
use crate::World;
/// Holds a component which is local to a single system.
#[derive(Debug)]
pub struct Local<'world, LocalComponent: Component>
{
- local_component: ComponentRefMut<'world, LocalComponent>,
+ local_component: ComponentHandleMut<'world, LocalComponent>,
}
-unsafe impl<'world, LocalComponent> SystemParam<'world> for Local<'world, LocalComponent>
+impl<'world, LocalComponent> SystemParam<'world> for Local<'world, LocalComponent>
where
LocalComponent: Component,
{
- type Flags = ();
type Input = LocalComponent;
fn initialize<SystemImpl>(
@@ -39,7 +38,7 @@ where
}
}
-impl<'world, LocalComponent> Deref for Local<'world, LocalComponent>
+impl<LocalComponent> Deref for Local<'_, LocalComponent>
where
LocalComponent: Component,
{
@@ -51,7 +50,7 @@ where
}
}
-impl<'world, LocalComponent> DerefMut for Local<'world, LocalComponent>
+impl<LocalComponent> DerefMut for Local<'_, LocalComponent>
where
LocalComponent: Component,
{