Skip to content

Commit 6112c84

Browse files
authored
small deterministic example update
1 parent 330efe9 commit 6112c84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/rayon-monte-carlo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn main() {
5555
.into_par_iter()
5656
.map(|i| {
5757
let mut rng = ChaCha8Rng::seed_from_u64(SEED);
58-
// We chose ChaCha because it's fast, has suitable statical properties for simulation,
58+
// We chose ChaCha because it's fast, has suitable statistical properties for simulation,
5959
// and because it supports this set_stream() api, which lets us chose a different stream
6060
// per work item. ChaCha supports 2^64 independent streams.
6161
rng.set_stream(i);
@@ -69,7 +69,7 @@ fn main() {
6969
}
7070
count
7171
})
72-
.reduce(|| 0usize, |a, b| a + b);
72+
.sum::<usize>();
7373

7474
// prints something close to 3.14159...
7575
println!(

0 commit comments

Comments
 (0)