Skip to content

Commit 4008138

Browse files
committed
ptr iter type is made explicit
1 parent 1611557 commit 4008138

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/concurrent_pinned_vec/con_pinvec.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ impl<T, G: GrowthWithConstantTimeAccess> ConcurrentPinnedVec<T> for ConcurrentSp
190190
where
191191
Self: 'a;
192192

193+
type PtrIter<'a>
194+
= IterPtrOfCon<'a, T, G>
195+
where
196+
Self: 'a;
197+
193198
unsafe fn into_inner(mut self, len: usize) -> Self::P {
194199
let mut fragments = Vec::with_capacity(self.max_num_fragments);
195200
let mut take_fragment = |fragment| fragments.push(fragment);
@@ -426,10 +431,7 @@ impl<T, G: GrowthWithConstantTimeAccess> ConcurrentPinnedVec<T> for ConcurrentSp
426431
self.pinned_vec_len = 0;
427432
}
428433

429-
unsafe fn ptr_iter_unchecked(
430-
&self,
431-
range: Range<usize>,
432-
) -> impl ExactSizeIterator<Item = *mut T> {
434+
unsafe fn ptr_iter_unchecked(&self, range: Range<usize>) -> Self::PtrIter<'_> {
433435
IterPtrOfCon::new(self.capacity(), &self.data, self.growth.clone(), range)
434436
}
435437
}

0 commit comments

Comments
 (0)