orx_split_vec/concurrent_iter/
con_iter_owned.rs1use crate::{ParGrowth, SplitVec};
2use alloc::vec::Vec;
3use orx_concurrent_iter::{
4 IntoConcurrentIter,
5 implementations::jagged_arrays::{ConIterJaggedOwned, RawJagged, RawVec},
6};
7
8impl<T, G> IntoConcurrentIter for SplitVec<T, G>
9where
10 G: ParGrowth,
11 T: Send + Sync,
12{
13 type Item = T;
14
15 type IntoIter = ConIterJaggedOwned<T, G>;
16
17 fn into_con_iter(self) -> Self::IntoIter {
18 let arrays = self
19 .fragments
20 .into_iter()
21 .map(|f| RawVec::from(Vec::from(f)))
22 .collect();
23 let jagged = RawJagged::new(arrays, self.growth, Some(self.len));
24 jagged.into_con_iter()
25 }
26}