summaryrefslogtreecommitdiff
path: root/src/rwlock
diff options
context:
space:
mode:
Diffstat (limited to 'src/rwlock')
-rw-r--r--src/rwlock/read_lock.rs10
-rw-r--r--src/rwlock/rwlock.rs10
-rw-r--r--src/rwlock/write_lock.rs10
3 files changed, 15 insertions, 15 deletions
diff --git a/src/rwlock/read_lock.rs b/src/rwlock/read_lock.rs
index 4f2bc86..c5c4c8c 100644
--- a/src/rwlock/read_lock.rs
+++ b/src/rwlock/read_lock.rs
@@ -6,7 +6,7 @@ use crate::key::Keyable;
use super::{ReadLock, RwLock, RwLockReadGuard, RwLockReadRef};
-impl<'l, T: ?Sized + Debug, R: RawRwLock> Debug for ReadLock<'l, T, R> {
+impl<T: ?Sized + Debug, R: RawRwLock> Debug for ReadLock<'_, T, R> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
// safety: this is just a try lock, and the value is dropped
// immediately after, so there's no risk of blocking ourselves
@@ -34,7 +34,7 @@ impl<'l, T, R> From<&'l RwLock<T, R>> for ReadLock<'l, T, R> {
}
}
-impl<'l, T: ?Sized, R> AsRef<RwLock<T, R>> for ReadLock<'l, T, R> {
+impl<T: ?Sized, R> AsRef<RwLock<T, R>> for ReadLock<'_, T, R> {
fn as_ref(&self) -> &RwLock<T, R> {
self.0
}
@@ -57,13 +57,13 @@ impl<'l, T, R> ReadLock<'l, T, R> {
}
}
-impl<'l, T: ?Sized, R: RawRwLock> ReadLock<'l, T, R> {
+impl<T: ?Sized, R: RawRwLock> ReadLock<'_, T, R> {
/// Locks the underlying [`RwLock`] with shared read access, blocking the
/// current thread until it can be acquired.
pub fn lock<'s, 'key: 's, Key: Keyable + 'key>(
&'s self,
key: Key,
- ) -> RwLockReadGuard<'_, 'key, T, Key, R> {
+ ) -> RwLockReadGuard<'s, 'key, T, Key, R> {
self.0.read(key)
}
@@ -72,7 +72,7 @@ impl<'l, T: ?Sized, R: RawRwLock> ReadLock<'l, T, R> {
pub fn try_lock<'s, 'key: 's, Key: Keyable + 'key>(
&'s self,
key: Key,
- ) -> Option<RwLockReadGuard<'_, 'key, T, Key, R>> {
+ ) -> Option<RwLockReadGuard<'s, 'key, T, Key, R>> {
self.0.try_read(key)
}
diff --git a/src/rwlock/rwlock.rs b/src/rwlock/rwlock.rs
index fddcf5a..063ab68 100644
--- a/src/rwlock/rwlock.rs
+++ b/src/rwlock/rwlock.rs
@@ -62,7 +62,7 @@ impl<T: ?Sized + Debug, R: RawRwLock> Debug for RwLock<T, R> {
}
}
-impl<T: ?Sized + Default, R: RawRwLock> Default for RwLock<T, R> {
+impl<T: Default, R: RawRwLock> Default for RwLock<T, R> {
fn default() -> Self {
Self::new(T::default())
}
@@ -140,7 +140,7 @@ impl<T: ?Sized, R: RawRwLock> RwLock<T, R> {
pub fn read<'s, 'key: 's, Key: Keyable>(
&'s self,
key: Key,
- ) -> RwLockReadGuard<'_, 'key, T, Key, R> {
+ ) -> RwLockReadGuard<'s, 'key, T, Key, R> {
unsafe {
self.raw.lock_shared();
@@ -172,7 +172,7 @@ impl<T: ?Sized, R: RawRwLock> RwLock<T, R> {
pub fn try_read<'s, 'key: 's, Key: Keyable>(
&'s self,
key: Key,
- ) -> Option<RwLockReadGuard<'_, 'key, T, Key, R>> {
+ ) -> Option<RwLockReadGuard<'s, 'key, T, Key, R>> {
unsafe {
if self.raw.try_lock_shared() {
// safety: the lock is locked first
@@ -233,7 +233,7 @@ impl<T: ?Sized, R: RawRwLock> RwLock<T, R> {
pub fn write<'s, 'key: 's, Key: Keyable>(
&'s self,
key: Key,
- ) -> RwLockWriteGuard<'_, 'key, T, Key, R> {
+ ) -> RwLockWriteGuard<'s, 'key, T, Key, R> {
unsafe {
self.raw.lock_exclusive();
@@ -266,7 +266,7 @@ impl<T: ?Sized, R: RawRwLock> RwLock<T, R> {
pub fn try_write<'s, 'key: 's, Key: Keyable>(
&'s self,
key: Key,
- ) -> Option<RwLockWriteGuard<'_, 'key, T, Key, R>> {
+ ) -> Option<RwLockWriteGuard<'s, 'key, T, Key, R>> {
unsafe {
if self.raw.try_lock_exclusive() {
// safety: the lock is locked first
diff --git a/src/rwlock/write_lock.rs b/src/rwlock/write_lock.rs
index 15eaacc..77b68c8 100644
--- a/src/rwlock/write_lock.rs
+++ b/src/rwlock/write_lock.rs
@@ -6,7 +6,7 @@ use crate::key::Keyable;
use super::{RwLock, RwLockWriteGuard, WriteLock};
-impl<'l, T: ?Sized + Debug, R: RawRwLock> Debug for WriteLock<'l, T, R> {
+impl<T: ?Sized + Debug, R: RawRwLock> Debug for WriteLock<'_, T, R> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
// safety: this is just a try lock, and the value is dropped
// immediately after, so there's no risk of blocking ourselves
@@ -36,7 +36,7 @@ impl<'l, T, R> From<&'l RwLock<T, R>> for WriteLock<'l, T, R> {
}
}
-impl<'l, T: ?Sized, R> AsRef<RwLock<T, R>> for WriteLock<'l, T, R> {
+impl<T: ?Sized, R> AsRef<RwLock<T, R>> for WriteLock<'_, T, R> {
fn as_ref(&self) -> &RwLock<T, R> {
self.0
}
@@ -59,13 +59,13 @@ impl<'l, T, R> WriteLock<'l, T, R> {
}
}
-impl<'l, T: ?Sized, R: RawRwLock> WriteLock<'l, T, R> {
+impl<T: ?Sized, R: RawRwLock> WriteLock<'_, T, R> {
/// Locks the underlying [`RwLock`] with exclusive write access, blocking
/// the current until it can be acquired.
pub fn lock<'s, 'key: 's, Key: Keyable + 'key>(
&'s self,
key: Key,
- ) -> RwLockWriteGuard<'_, 'key, T, Key, R> {
+ ) -> RwLockWriteGuard<'s, 'key, T, Key, R> {
self.0.write(key)
}
@@ -73,7 +73,7 @@ impl<'l, T: ?Sized, R: RawRwLock> WriteLock<'l, T, R> {
pub fn try_lock<'s, 'key: 's, Key: Keyable + 'key>(
&'s self,
key: Key,
- ) -> Option<RwLockWriteGuard<'_, 'key, T, Key, R>> {
+ ) -> Option<RwLockWriteGuard<'s, 'key, T, Key, R>> {
self.0.try_write(key)
}