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
chore: add debug_assert_ne to check x is not zero
Signed-off-by: Yuuki Takano <[email protected]>
  • Loading branch information
ytakano committed Jan 14, 2025
commit d06f2266caebd72c4522703a856cb36ece82c311
1 change: 1 addition & 0 deletions futures-util/src/async_await/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ fn xorshift64star(mut x: Wrapping<u64>) -> (Wrapping<u64>, u64) {
#[cfg(not(feature = "std"))]
#[inline]
fn xorshift32(mut x: u32) -> u32 {
debug_assert_ne!(x, 0);
x ^= x << 13;
x ^= x >> 17;
x ^= x << 5;
Expand Down
Loading