Activate parallelism tests
@@ -180,12 +180,19 @@ mod tests {
use super::*;
#[test]
- #[ignore]
fn test_maybe_parallel_iterator() {
let mut v = vec![1u32, 2, 3, 4, 5, 6];
assert_eq!(v.maybe_par_iter().sum::<u32>(), 21);
- assert_eq!(v.maybe_par_iter_mut().map(|v| *v * 2).sum::<u32>(), 42);
+ assert_eq!(
+ v.maybe_par_iter_mut()
+ .map(|v| {
+ *v *= 2;
+ *v
+ })
+ .sum::<u32>(),
+ 42
+ );
assert_eq!(v.maybe_par_iter().sum::<u32>(), 42);
assert_eq!(v.into_maybe_par_iter().sum::<u32>(), 42);
}
