Re: [RFC PATCH 1/1] v4l2-core: rewrite the VP9 library in Rust
From: Daniel Almeida
Date: Wed Feb 28 2024 - 13:00:51 EST
Hi Alice!
On Wednesday, February 28, 2024 11:13 -03, Alice Ryhl <aliceryhl@googlecom> wrote:
> I recommend taking an `*mut u8` here instead of `&mut u8` if you're
> going to use `slice::from_raw_parts_mut`. Or, if cbindgen allows it,
> take an `&mut [u8; 8]` instead and eliminate the unsafe block.
You're right, the signature here can change to `&mut [u8; 8]` instead. This means no unsafe blocks at all.
Thanks for the tip,
-- Daniel