Skip to content

Commit 418eaba

Browse files
committed
Fix wasi
1 parent 86a610c commit 418eaba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wasi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn getrandom_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
2424
// https://docs.rs/wasi/0.11.0+wasi-snapshot-preview1/src/wasi/lib_generated.rs.html#2046-2062
2525
// Note that size of an allocated object can not be bigger than isize::MAX bytes.
2626
// WASI 0.1 supports only 32-bit WASM, so casting length to `i32` is safe.
27-
#[allow(clippy::cast_possible_truncation)]
27+
#[allow(clippy::cast_possible_truncation, clippy::cast_possible_wrap)]
2828
let ret = unsafe { random_get(dest.as_mut_ptr() as i32, dest.len() as i32) };
2929
match ret {
3030
0 => Ok(()),

0 commit comments

Comments
 (0)