From db5963b699bf0b8d9bb826e700aa3cbd9593490b Mon Sep 17 00:00:00 2001 From: nhtyy Date: Tue, 7 Jan 2025 19:11:13 -0800 Subject: [PATCH] fix: pal needs u8 --- library/std/src/sys/pal/zkvm/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std/src/sys/pal/zkvm/mod.rs b/library/std/src/sys/pal/zkvm/mod.rs index c4e494f865c..dc15166fd3f 100644 --- a/library/std/src/sys/pal/zkvm/mod.rs +++ b/library/std/src/sys/pal/zkvm/mod.rs @@ -62,11 +62,11 @@ pub fn abort_internal() -> ! { } pub fn hashmap_random_keys() -> (u64, u64) { - let mut buf = [0u32; 16]; + let mut buf = [0u8; 16]; unsafe { abi::sys_rand(buf.as_mut_ptr(), buf.len()); }; let a = u64::from_le_bytes(buf[0..8].try_into().unwrap()); let b = u64::from_le_bytes(buf[8..16].try_into().unwrap()); (a, b) -} +} \ No newline at end of file