mirror of https://github.com/smol-rs/fastrand
Remove unnecessary seed modifcation
Because the first step of wyrand is an addition with a constant, a non-zero seed is not required
This commit is contained in:
parent
a8f98b445d
commit
63175fa2e2
|
@ -193,8 +193,7 @@ fn random_seed() -> Option<u64> {
|
|||
let mut hasher = DefaultHasher::new();
|
||||
Instant::now().hash(&mut hasher);
|
||||
thread::current().id().hash(&mut hasher);
|
||||
let hash = hasher.finish();
|
||||
Some((hash << 1) | 1)
|
||||
Some(hasher.finish())
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
|
|
Loading…
Reference in New Issue