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