File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ fn main() {
55
55
. into_par_iter ( )
56
56
. map ( |i| {
57
57
let mut rng = ChaCha8Rng :: seed_from_u64 ( SEED ) ;
58
- // We chose ChaCha because it's fast, has suitable statical properties for simulation,
59
- // and because it supports this set_stream() api, which lets us chose a different stream
58
+ // We chose ChaCha because it's fast, has suitable statistical properties for simulation,
59
+ // and because it supports this set_stream() api, which lets us choose a different stream
60
60
// per work item. ChaCha supports 2^64 independent streams.
61
61
rng. set_stream ( i) ;
62
62
let mut count = 0 ;
@@ -69,7 +69,10 @@ fn main() {
69
69
}
70
70
count
71
71
} )
72
- . reduce ( || 0usize , |a, b| a + b) ;
72
+ . sum :: < usize > ( ) ;
73
+
74
+ // assert this is deterministic
75
+ assert_eq ! ( in_circle, 7852263 ) ;
73
76
74
77
// prints something close to 3.14159...
75
78
println ! (
You can’t perform that action at this time.
0 commit comments