Replace ptr casts with typed cast() method

Replace type inferred raw pointer casts with .cast() method calls to
make intent clearer.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
This commit is contained in:
Manos Pitsidianakis 2025-08-01 21:06:51 +03:00 committed by Stefano Garzarella
parent 926ea9b1c8
commit 019e02b0f2
4 changed files with 7 additions and 5 deletions

View file

@ -637,7 +637,8 @@ impl VhostUserBackendMut for VhostUserCanBackend {
.config()
.as_slice()
.as_ptr()
.offset(offset as isize) as *const _ as *const _,
.offset(offset as isize)
.cast::<u8>(),
size as usize,
)
.to_vec()