summaryrefslogtreecommitdiff
path: root/src/rwlock
diff options
context:
space:
mode:
Diffstat (limited to 'src/rwlock')
-rw-r--r--src/rwlock/read_lock.rs4
-rw-r--r--src/rwlock/write_lock.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/rwlock/read_lock.rs b/src/rwlock/read_lock.rs
index 011bd8c..29042b5 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<T: ?Sized + Debug, R: RawRwLock> Debug for ReadLock<T, R> {
+impl<'l, T: ?Sized + Debug, R: RawRwLock> Debug for ReadLock<'l, 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<T: ?Sized, R> AsRef<RwLock<T, R>> for ReadLock<T, R> {
+impl<'l, T: ?Sized, R> AsRef<RwLock<T, R>> for ReadLock<'l, T, R> {
fn as_ref(&self) -> &RwLock<T, R> {
&self.0
}
diff --git a/src/rwlock/write_lock.rs b/src/rwlock/write_lock.rs
index 1f7112a..8501cd8 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, RwLockWriteRef, WriteLock};
-impl<T: ?Sized + Debug, R: RawRwLock> Debug for WriteLock<T, R> {
+impl<'l, T: ?Sized + Debug, R: RawRwLock> Debug for WriteLock<'l, 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,9 +34,9 @@ impl<'l, T, R> From<&'l RwLock<T, R>> for WriteLock<'l, T, R> {
}
}
-impl<T: ?Sized, R> AsRef<RwLock<T, R>> for WriteLock<T, R> {
+impl<'l, T: ?Sized, R> AsRef<RwLock<T, R>> for WriteLock<'l, T, R> {
fn as_ref(&self) -> &RwLock<T, R> {
- &self.0
+ self.0
}
}
@@ -57,7 +57,7 @@ impl<'l, T, R> WriteLock<'l, T, R> {
}
}
-impl<T: ?Sized, R: RawRwLock> WriteLock<T, R> {
+impl<'l, T: ?Sized, R: RawRwLock> WriteLock<'l, 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>(