diff options
| author | Mica White <botahamec@outlook.com> | 2024-03-13 16:51:20 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2024-03-13 16:51:20 -0400 |
| commit | 4c3b8acb705905ed986ce1320d5580892497292c (patch) | |
| tree | ad12fd8a136fe065b01ed939a4abe98b1bd94fc6 /src/collection | |
| parent | 603fa7a98ccedad0201164fa0b03c745d25b955b (diff) | |
Trait bounds on AsRef and AsMut
Diffstat (limited to 'src/collection')
| -rw-r--r-- | src/collection/collection.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/collection/collection.rs b/src/collection/collection.rs index cc8b334..ae9f3f6 100644 --- a/src/collection/collection.rs +++ b/src/collection/collection.rs @@ -24,25 +24,25 @@ impl<'a, L: OwnedLockable<'a>> From<L> for LockCollection<L> { } } -impl<'a, L: OwnedLockable<'a>> AsRef<L> for LockCollection<L> { +impl<'a, L: Lockable<'a>> AsRef<L> for LockCollection<L> { fn as_ref(&self) -> &L { &self.data } } -impl<'a, L: OwnedLockable<'a>> AsMut<L> for LockCollection<L> { +impl<'a, L: Lockable<'a>> AsMut<L> for LockCollection<L> { fn as_mut(&mut self) -> &mut L { &mut self.data } } -impl<'a, L: OwnedLockable<'a>> AsRef<Self> for LockCollection<L> { +impl<'a, L: Lockable<'a>> AsRef<Self> for LockCollection<L> { fn as_ref(&self) -> &Self { self } } -impl<'a, L: OwnedLockable<'a>> AsMut<Self> for LockCollection<L> { +impl<'a, L: Lockable<'a>> AsMut<Self> for LockCollection<L> { fn as_mut(&mut self) -> &mut Self { self } |
