Skip to content

Commit

Permalink
Merge pull request #906 from dbdr/master
Browse files Browse the repository at this point in the history
Small simplification of doc example
  • Loading branch information
dhardy committed Nov 9, 2019
2 parents 19b5a3e + 56d3396 commit 885655d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/rngs/small.rs
Expand Up @@ -56,7 +56,6 @@ type Rng = rand_pcg::Pcg32;
/// efficient:
///
/// ```
/// use std::iter;
/// use rand::{SeedableRng, thread_rng};
/// use rand::rngs::SmallRng;
///
Expand All @@ -65,9 +64,8 @@ type Rng = rand_pcg::Pcg32;
/// let mut thread_rng = thread_rng();
/// // Create small, cheap to initialize and fast RNGs with random seeds.
/// // One can generally assume this won't fail.
/// let rngs: Vec<SmallRng> = iter::repeat(())
/// .map(|()| SmallRng::from_rng(&mut thread_rng).unwrap())
/// .take(10)
/// let rngs: Vec<SmallRng> = (0..10)
/// .map(|_| SmallRng::from_rng(&mut thread_rng).unwrap())
/// .collect();
/// ```
///
Expand Down

0 comments on commit 885655d

Please sign in to comment.