Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
Signed-off-by: Yuuki Takano <[email protected]>
  • Loading branch information
ytakano committed Dec 25, 2024
commit 4f776f91af815b16c1b4cbf013185e1c6fe04065
7 changes: 3 additions & 4 deletions futures-util/src/async_await/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ fn random() -> u64 {
x ^= x >> 12;
x ^= x << 25;
x ^= x >> 27;
x = x.wrapping_mul(0x2545_f491_4f6c_dd1d);
}

let result = x.wrapping_mul(0x2545_f491_4f6c_dd1d) as u64;
RNG.store(result as usize, Ordering::Relaxed);

result
RNG.store(x, Ordering::Relaxed);
x as u64
}
Loading