indexmap/rayon/
mod.rs

1#![cfg_attr(docsrs, doc(cfg(feature = "rayon")))]
2
3use rayon::prelude::*;
4
5use alloc::collections::LinkedList;
6
7use crate::vec::Vec;
8
9pub mod map;
10pub mod set;
11
12// This form of intermediate collection is also how Rayon collects `HashMap`.
13// Note that the order will also be preserved!
14fn collect<I: IntoParallelIterator>(iter: I) -> LinkedList<Vec<I::Item>> {
15    iter.into_par_iter().collect_vec_list()
16}