Drop the `FdGuard` and close the file descriptor it holds.
(&mut self)
| 39 | impl Drop for FdGuard { |
| 40 | /// Drop the `FdGuard` and close the file descriptor it holds. |
| 41 | fn drop(&mut self) { |
| 42 | // SAFETY: Unsafe because this is a call into a C API, but this particular |
| 43 | // call is always safe. |
| 44 | unsafe { |
| 45 | let ret = libc::close(self.0); |
| 46 | assert!(ret == 0 || errno() == Errno(libc::EINTR)); |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | /// A guard tracking an memory mapped file. |
nothing calls this directly
no outgoing calls
no test coverage detected