diff options
| author | Mica White <botahamec@gmail.com> | 2024-07-16 17:02:42 -0400 |
|---|---|---|
| committer | Mica White <botahamec@gmail.com> | 2024-07-16 17:03:50 -0400 |
| commit | df7c467005756433b2627b766bd086efda8689f4 (patch) | |
| tree | 51390b3159e30daa37d343eb2494732f06b865d2 /src | |
| parent | 72cb87867a7d14d8c39ca6919e835c0c2fc3a81d (diff) | |
Fix trait bounds for LockCollection::from
Diffstat (limited to 'src')
| -rw-r--r-- | src/collection/boxed.rs | 2 | ||||
| -rw-r--r-- | src/collection/owned.rs | 2 | ||||
| -rw-r--r-- | src/collection/ref.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/collection/boxed.rs b/src/collection/boxed.rs index 375564c..a12a690 100644 --- a/src/collection/boxed.rs +++ b/src/collection/boxed.rs @@ -102,7 +102,7 @@ impl<L: OwnedLockable + Default> Default for BoxedLockCollection<L> { } } -impl<L: OwnedLockable + Default> From<L> for BoxedLockCollection<L> { +impl<L: OwnedLockable> From<L> for BoxedLockCollection<L> { fn from(value: L) -> Self { Self::new(value) } diff --git a/src/collection/owned.rs b/src/collection/owned.rs index 919c403..d180ed2 100644 --- a/src/collection/owned.rs +++ b/src/collection/owned.rs @@ -72,7 +72,7 @@ impl<L: OwnedLockable + Default> Default for OwnedLockCollection<L> { } } -impl<L: OwnedLockable + Default> From<L> for OwnedLockCollection<L> { +impl<L: OwnedLockable> From<L> for OwnedLockCollection<L> { fn from(value: L) -> Self { Self::new(value) } diff --git a/src/collection/ref.rs b/src/collection/ref.rs index cc234d1..748d2d2 100644 --- a/src/collection/ref.rs +++ b/src/collection/ref.rs @@ -89,7 +89,7 @@ impl<'a, L: OwnedLockable> RefLockCollection<'a, L> { /// let lock = RefLockCollection::new(&data); /// ``` #[must_use] - pub fn new(data: &'a L) -> RefLockCollection<L> { + pub fn new(data: &'a L) -> Self { RefLockCollection { locks: get_locks(data), data, |
