diff --git a/src/guard.rs b/src/guard.rs index daa18d8..24872e0 100644 --- a/src/guard.rs +++ b/src/guard.rs @@ -36,7 +36,7 @@ impl<'a> ReadGuard<'a> { } } -impl<'a> Drop for ReadGuard<'a> { +impl Drop for ReadGuard<'_> { /// Unlocks stored `version` when `ReadGuard` goes out of scope fn drop(&mut self) { self.state.runlock(self.version); @@ -66,7 +66,7 @@ impl<'a, T: Archive> ReadResult<'a, T> { } } -impl<'a, T: Archive> Deref for ReadResult<'a, T> { +impl Deref for ReadResult<'_, T> { type Target = Archived; /// Dereferences stored `entity` for easier access diff --git a/src/locks.rs b/src/locks.rs index 88e2ae1..4d9f584 100644 --- a/src/locks.rs +++ b/src/locks.rs @@ -77,11 +77,11 @@ impl<'a> WriteLockStrategySealed<'a> for LockDisabled { } } -impl<'a> WriteLockStrategy<'a> for LockDisabled {} +impl WriteLockStrategy<'_> for LockDisabled {} pub struct DisabledGuard<'a>(&'a mut MmapMut); -impl<'a> Deref for DisabledGuard<'a> { +impl Deref for DisabledGuard<'_> { type Target = MmapMut; fn deref(&self) -> &Self::Target { @@ -89,7 +89,7 @@ impl<'a> Deref for DisabledGuard<'a> { } } -impl<'a> DerefMut for DisabledGuard<'a> { +impl DerefMut for DisabledGuard<'_> { fn deref_mut(&mut self) -> &mut Self::Target { &mut *self.0 } @@ -145,14 +145,14 @@ impl<'a> WriteLockStrategySealed<'a> for SingleWriter { } #[cfg(unix)] -impl<'a> WriteLockStrategy<'a> for SingleWriter {} +impl WriteLockStrategy<'_> for SingleWriter {} /// A simple guard which does not release the lock upon being dropped. #[cfg(unix)] pub struct SingleWriterGuard<'a>(&'a mut MmapMut); #[cfg(unix)] -impl<'a> Deref for SingleWriterGuard<'a> { +impl Deref for SingleWriterGuard<'_> { type Target = MmapMut; fn deref(&self) -> &Self::Target { @@ -161,7 +161,7 @@ impl<'a> Deref for SingleWriterGuard<'a> { } #[cfg(unix)] -impl<'a> DerefMut for SingleWriterGuard<'a> { +impl DerefMut for SingleWriterGuard<'_> { fn deref_mut(&mut self) -> &mut Self::Target { &mut *self.0 } diff --git a/src/synchronizer.rs b/src/synchronizer.rs index 2cf87d2..3b50b76 100644 --- a/src/synchronizer.rs +++ b/src/synchronizer.rs @@ -219,7 +219,7 @@ where pub unsafe fn read( &'a mut self, check_bytes: bool, - ) -> Result, SynchronizerError> + ) -> Result, SynchronizerError> where T: Archive, T::Archived: for<'b> CheckBytes>,