From b7977315bdb8a0e90f45d70d180ce82c1f175210 Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Tue, 18 Oct 2022 18:34:30 -0700 Subject: [PATCH] Allow rdrand tests to work with new implementation Signed-off-by: Joe Richey --- tests/rdrand.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/rdrand.rs b/tests/rdrand.rs index 4ff85c47..25678683 100644 --- a/tests/rdrand.rs +++ b/tests/rdrand.rs @@ -11,5 +11,10 @@ mod rdrand; #[path = "../src/util.rs"] mod util; -use rdrand::getrandom_inner as getrandom_impl; +// The rdrand implementation has the signature of getrandom_uninit(), but our +// tests expect getrandom_impl() to have the signature of getrandom(). +fn getrandom_impl(dest: &mut [u8]) -> Result<(), Error> { + rdrand::getrandom_inner(unsafe { util::slice_as_uninit_mut(dest) })?; + Ok(()) +} mod common;