We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 19b5a3e + 56d3396 commit 885655dCopy full SHA for 885655d
1 file changed
src/rngs/small.rs
@@ -56,7 +56,6 @@ type Rng = rand_pcg::Pcg32;
56
/// efficient:
57
///
58
/// ```
59
-/// use std::iter;
60
/// use rand::{SeedableRng, thread_rng};
61
/// use rand::rngs::SmallRng;
62
@@ -65,9 +64,8 @@ type Rng = rand_pcg::Pcg32;
65
64
/// let mut thread_rng = thread_rng();
66
/// // Create small, cheap to initialize and fast RNGs with random seeds.
67
/// // One can generally assume this won't fail.
68
-/// let rngs: Vec<SmallRng> = iter::repeat(())
69
-/// .map(|()| SmallRng::from_rng(&mut thread_rng).unwrap())
70
-/// .take(10)
+/// let rngs: Vec<SmallRng> = (0..10)
+/// .map(|_| SmallRng::from_rng(&mut thread_rng).unwrap())
71
/// .collect();
72
73
0 commit comments