Skip to content

Commit 63175fa

Browse files
ironhavennotgull
authored andcommitted
Remove unnecessary seed modifcation
Because the first step of wyrand is an addition with a constant, a non-zero seed is not required
1 parent a8f98b4 commit 63175fa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/global_rng.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ fn random_seed() -> Option<u64> {
193193
let mut hasher = DefaultHasher::new();
194194
Instant::now().hash(&mut hasher);
195195
thread::current().id().hash(&mut hasher);
196-
let hash = hasher.finish();
197-
Some((hash << 1) | 1)
196+
Some(hasher.finish())
198197
}
199198

200199
#[cfg(all(

0 commit comments

Comments
 (0)