diff options
| author | Botahamec <botahamec@outlook.com> | 2024-05-21 13:18:10 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-05-21 13:18:10 -0400 |
| commit | 6e3aa5182604b30ef75ba5676e9f677cc1d18fe3 (patch) | |
| tree | d8e23a82c8151c4b49c15f49707d96651764db39 /src/collection/ref_collection.rs | |
| parent | 875d5c4ad6e0c2a78c15476584fc686121b340d3 (diff) | |
| parent | c344021797b7e1f8027bd9d1302908f0767e362b (diff) | |
Merge remote-tracking branch 'origin/0.2' into 0.2
Diffstat (limited to 'src/collection/ref_collection.rs')
| -rw-r--r-- | src/collection/ref_collection.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/collection/ref_collection.rs b/src/collection/ref_collection.rs index 9dfa0e9..41f6b16 100644 --- a/src/collection/ref_collection.rs +++ b/src/collection/ref_collection.rs @@ -5,7 +5,7 @@ use crate::{key::Keyable, lockable::Lock, Lockable, OwnedLockable}; use super::{LockGuard, RefLockCollection}; #[must_use] -fn get_locks<'a, L: Lockable<'a> + 'a>(data: &'a L) -> Vec<&'a dyn Lock> { +fn get_locks<L: Lockable>(data: &L) -> Vec<&dyn Lock> { let mut locks = Vec::new(); data.get_ptrs(&mut locks); locks.sort_by_key(|lock| std::ptr::from_ref(*lock)); @@ -19,19 +19,19 @@ fn contains_duplicates(l: &[&dyn Lock]) -> bool { .any(|window| std::ptr::eq(window[0], window[1])) } -impl<'a, L: Lockable<'a>> AsRef<L> for RefLockCollection<'a, L> { +impl<'a, L: Lockable> AsRef<L> for RefLockCollection<'a, L> { fn as_ref(&self) -> &L { self.data } } -impl<'a, L: Lockable<'a>> AsRef<Self> for RefLockCollection<'a, L> { +impl<'a, L: Lockable> AsRef<Self> for RefLockCollection<'a, L> { fn as_ref(&self) -> &Self { self } } -impl<'a, L: Lockable<'a>> AsMut<Self> for RefLockCollection<'a, L> { +impl<'a, L: Lockable> AsMut<Self> for RefLockCollection<'a, L> { fn as_mut(&mut self) -> &mut Self { self } @@ -49,7 +49,7 @@ where } } -impl<'a, L: OwnedLockable<'a> + 'a> RefLockCollection<'a, L> { +impl<'a, L: OwnedLockable> RefLockCollection<'a, L> { /// Creates a new collection of owned locks. /// /// Because the locks are owned, there's no need to do any checks for @@ -72,7 +72,7 @@ impl<'a, L: OwnedLockable<'a> + 'a> RefLockCollection<'a, L> { } } -impl<'a, L: Lockable<'a>> RefLockCollection<'a, L> { +impl<'a, L: Lockable> RefLockCollection<'a, L> { /// Creates a new collections of locks. /// /// # Safety |
