input: replace fallible integer cast with try_into

casting usize as i32 might wrap around in 32-bit targets, we don't
target them, but clippy complains.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
This commit is contained in:
Manos Pitsidianakis 2025-08-01 21:12:00 +03:00 committed by Stefano Garzarella
parent 019e02b0f2
commit 735bbdbb21

View file

@ -64,7 +64,7 @@ macro_rules! ioctl_read_buf {
for item in data.iter_mut() {
*item = $nr as u8;
}
Ok(data.len() as i32)
Ok(data.len().try_into().unwrap())
}
)
}