diff --git a/src/windows7.rs b/src/windows7.rs index df83c5e6..ff8ff0e0 100644 --- a/src/windows7.rs +++ b/src/windows7.rs @@ -25,7 +25,7 @@ const TRUE: BOOLEAN = 1u8; pub fn getrandom_inner(dest: &mut [MaybeUninit]) -> Result<(), Error> { // Prevent overflow of u32 - for chunk in dest.chunks_mut(u32::max_value() as usize) { + for chunk in dest.chunks_mut(u32::MAX as usize) { let ret = unsafe { RtlGenRandom(chunk.as_mut_ptr().cast::(), chunk.len() as u32) }; if ret != TRUE { return Err(Error::WINDOWS_RTL_GEN_RANDOM);