about summary refs log tree commit diff
path: root/library/std/src/sys/random
diff options
context:
space:
mode:
authorLi Keqing <auroracloud4096@gmail.com>2025-02-19 18:05:37 +0800
committerLi Keqing <auroracloud4096@gmail.com>2025-02-19 18:05:37 +0800
commit35febd7a6d57179f41cb5b4a37f9545915e4d7a5 (patch)
tree0f82a7f9400215e676919cc5a1b9e5a1060c13aa /library/std/src/sys/random
parent5986ff05d8480da038dd161b3a6aa79ff364a851 (diff)
downloadrust-35febd7a6d57179f41cb5b4a37f9545915e4d7a5.tar.gz
rust-35febd7a6d57179f41cb5b4a37f9545915e4d7a5.zip
Fix `*-win7-windows-msvc` target since 26eeac1a1e9fe46ffd80dd0d3dafdd2c2a644306
Diffstat (limited to 'library/std/src/sys/random')
-rw-r--r--library/std/src/sys/random/windows.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/random/windows.rs b/library/std/src/sys/random/windows.rs
index 7566000f9e6..f5da637f56c 100644
--- a/library/std/src/sys/random/windows.rs
+++ b/library/std/src/sys/random/windows.rs
@@ -14,7 +14,7 @@ pub fn fill_bytes(mut bytes: &mut [u8]) {
     while !bytes.is_empty() {
         let len = bytes.len().try_into().unwrap_or(u32::MAX);
         let ret = unsafe { c::RtlGenRandom(bytes.as_mut_ptr().cast(), len) };
-        assert_ne!(ret, 0, "failed to generate random data");
+        assert!(ret, "failed to generate random data");
         bytes = &mut bytes[len as usize..];
     }
 }