We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8f40e1 commit 8e1ab1aCopy full SHA for 8e1ab1a
src/custom.rs
@@ -78,8 +78,9 @@ macro_rules! register_custom_getrandom {
78
// We use an extern "C" function to get the guarantees of a stable ABI.
79
#[no_mangle]
80
extern "C" fn __getrandom_custom(dest: *mut u8, len: usize) -> u32 {
81
+ let f: fn(&mut [u8]) -> Result<(), ::getrandom::Error> = $path;
82
let slice = unsafe { ::core::slice::from_raw_parts_mut(dest, len) };
- match $path(slice) {
83
+ match f(slice) {
84
Ok(()) => 0,
85
Err(e) => e.code().get(),
86
}
0 commit comments