Skip to content

Commit

Permalink
Allow rdrand tests to work with new implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Richey <joerichey@google.com>
  • Loading branch information
josephlr committed Oct 19, 2022
1 parent 107743e commit b797731
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/rdrand.rs
Expand Up @@ -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;

0 comments on commit b797731

Please sign in to comment.