diff options
Diffstat (limited to 'ecs/src/system.rs')
-rw-r--r-- | ecs/src/system.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ecs/src/system.rs b/ecs/src/system.rs index b410d8f..40eba8d 100644 --- a/ecs/src/system.rs +++ b/ecs/src/system.rs @@ -247,9 +247,7 @@ impl<'component, ComponentT: Component> FromLockedOptionalComponent<'component> ) -> Result<Self, LockError> { Ok(Self::from_optional_mut_component( - optional_component - .map(|lock| lock.write_nonblock()) - .transpose()?, + optional_component.map(Lock::write_nonblock).transpose()?, world, )) } @@ -285,7 +283,7 @@ where } } -impl<'a, ComponentT: Component> Deref for ComponentRefMut<'a, ComponentT> +impl<ComponentT: Component> Deref for ComponentRefMut<'_, ComponentT> { type Target = ComponentT; @@ -295,7 +293,7 @@ impl<'a, ComponentT: Component> Deref for ComponentRefMut<'a, ComponentT> } } -impl<'a, ComponentT: Component> DerefMut for ComponentRefMut<'a, ComponentT> +impl<ComponentT: Component> DerefMut for ComponentRefMut<'_, ComponentT> { fn deref_mut(&mut self) -> &mut Self::Target { @@ -355,9 +353,7 @@ impl<'component, ComponentT: Component> FromLockedOptionalComponent<'component> ) -> Result<Self, LockError> { Ok(Self::from_optional_component( - optional_component - .map(|lock| lock.read_nonblock()) - .transpose()?, + optional_component.map(Lock::read_nonblock).transpose()?, world, )) } @@ -393,7 +389,7 @@ where } } -impl<'a, ComponentT: Component> Deref for ComponentRef<'a, ComponentT> +impl<ComponentT: Component> Deref for ComponentRef<'_, ComponentT> { type Target = ComponentT; |