Improve the `map` method doc example readability
@@ -243,14 +243,11 @@ pub trait ParallelIterator: Sized + Send {
/// ```
/// use rayon::prelude::*;
///
- /// let mut par_iter = (0..100).into_par_iter().map(|x| x * 2);
+ /// let mut par_iter = (0..5).into_par_iter().map(|x| x * 2);
///
/// let doubles: Vec<_> = par_iter.collect();
///
- /// assert_eq!(doubles[0], 0);
- /// assert_eq!(doubles[1], 2);
- /// assert_eq!(doubles[2], 4);
- /// assert_eq!(doubles[3], 6);
+ /// assert_eq!(&doubles[..], &[0, 2, 4, 6, 8]);
/// ```
fn map<F, R>(self, map_op: F) -> Map<Self, F>
where F: Fn(Self::Item) -> R + Sync + Send,
