Skip to content

Commit 4543871

Browse files
committed
Remove unnecessary cast
1 parent 17040a7 commit 4543871

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/pass-dep/libc/libc-eventfd.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ fn main() {
1111
}
1212

1313
fn read_bytes<const N: usize>(fd: i32, buf: &mut [u8; N]) -> i32 {
14-
let res: i32 =
15-
unsafe { libc::read(fd, buf.as_mut_ptr().cast(), N as libc::size_t).try_into().unwrap() };
14+
let res: i32 = unsafe { libc::read(fd, buf.as_mut_ptr().cast(), N).try_into().unwrap() };
1615
return res;
1716
}
1817

0 commit comments

Comments
 (0)