()
| 42 | /// CRT functions set errno, not GetLastError(), so we need to read errno directly. |
| 43 | #[cfg(windows)] |
| 44 | pub fn errno_io_error() -> io::Error { |
| 45 | let errno: i32 = get_errno(); |
| 46 | let winerror = errno_to_winerror(errno); |
| 47 | io::Error::from_raw_os_error(winerror) |
| 48 | } |
| 49 | |
| 50 | #[cfg(not(windows))] |
| 51 | pub fn errno_io_error() -> io::Error { |
no test coverage detected