Skip to content

Commit 1705b40

Browse files
authored
replace mem::uninitialized with mem::zeroed
1 parent 0ada41a commit 1705b40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rdrand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const WORD_SIZE: usize = mem::size_of::<u64>();
2323
#[target_feature(enable = "rdrand")]
2424
unsafe fn rdrand() -> Result<[u8; WORD_SIZE], Error> {
2525
for _ in 0..RETRY_LIMIT {
26-
let mut el = mem::uninitialized();
26+
let mut el = mem::zeroed();
2727
if _rdrand64_step(&mut el) == 1 {
2828
// AMD CPUs from families 14h to 16h (pre Ryzen) sometimes fail to
2929
// set CF on bogus random data, so we check these values explictly.

0 commit comments

Comments
 (0)