()
| 145 | |
| 146 | impl FdSet { |
| 147 | pub fn new() -> Self { |
| 148 | // it's just ints, and all the code that's actually |
| 149 | // interacting with it is in C, so it's safe to zero |
| 150 | let mut fdset = core::mem::MaybeUninit::zeroed(); |
| 151 | unsafe { platform::FD_ZERO(fdset.as_mut_ptr()) }; |
| 152 | Self(fdset) |
| 153 | } |
| 154 | |
| 155 | pub fn insert(&mut self, fd: RawFd) { |
| 156 | unsafe { platform::FD_SET(fd, self.0.as_mut_ptr()) }; |
nothing calls this directly
no test coverage detected