We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59abdb6 commit a50811aCopy full SHA for a50811a
library/std/src/sys/unix/fd.rs
@@ -69,6 +69,7 @@ const fn max_iov() -> usize {
69
impl FileDesc {
70
pub fn new(fd: c_int) -> FileDesc {
71
assert_ne!(fd, -1);
72
+ // 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)
73
unsafe { FileDesc { fd } }
74
}
75
0 commit comments