Skip to content

Commit 094b1da

Browse files
authored
Check that c_int is i32 in FileDesc::new.
1 parent 08b70ed commit 094b1da

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/sys/unix

1 file changed

+1
-1
lines changed

library/std/src/sys/unix/fd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const fn max_iov() -> usize {
6868

6969
impl FileDesc {
7070
pub fn new(fd: c_int) -> FileDesc {
71-
assert_ne!(fd, -1);
71+
assert_ne!(fd, -1i32);
7272
// SAFETY: we just asserted that the value is in the valid range and isn't `-1` (the only value bigger than `0xFF_FF_FF_FE` unsigned)
7373
unsafe { FileDesc { fd } }
7474
}

0 commit comments

Comments
 (0)