From 67403c890c62f8a81624ba71e31937d91b66a4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Wed, 12 Jun 2024 15:15:22 +0400 Subject: [PATCH] Fix CLippy warning --- src/windows7.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);