orx_fixed_vec/
into_concurrent_pinned_vec.rs1use crate::{ConcurrentFixedVec, FixedVec};
2use orx_pinned_vec::IntoConcurrentPinnedVec;
3
4impl<T> IntoConcurrentPinnedVec<T> for FixedVec<T> {
5 type ConPinnedVec = ConcurrentFixedVec<T>;
6
7 fn into_concurrent(self) -> Self::ConPinnedVec {
8 self.into()
9 }
10
11 fn into_concurrent_filled_with<F>(mut self, fill_with: F) -> Self::ConPinnedVec
12 where
13 F: Fn() -> T,
14 {
15 let (len, capacity) = (self.data.len(), self.data.capacity());
16 for _ in len..capacity {
17 self.data.push(fill_with());
18 }
19 self.into()
20 }
21}