Use !0 instead of usize::MAX
We could use core::usize::MAX, but that is deprecated. Signed-off-by: Joe Richey <joerichey@google.com>
This commit is contained in:
+2
-2
@@ -50,8 +50,8 @@ compile_error!(
|
||||
// Fails with probability < 2^(-90) on 32-bit systems
|
||||
#[target_feature(enable = "rdrand")]
|
||||
unsafe fn self_test() -> bool {
|
||||
// On AMD, RDRAND returns usize::MAX on failure, count it as a collision.
|
||||
let mut prev = usize::MAX;
|
||||
// On AMD, RDRAND returns 0xFF...FF on failure, count it as a collision.
|
||||
let mut prev = !0; // TODO(MSRV 1.43): Move to usize::MAX
|
||||
let mut fails = 0;
|
||||
for _ in 0..8 {
|
||||
match rdrand() {
|
||||
|
||||
Reference in New Issue
Block a user