util::error: correct comment regarding errno reexports

This commit is contained in:
Zhiming Wang 2020-08-09 13:57:43 +08:00
parent 81e142c6b7
commit c9d223e8fe
No known key found for this signature in database
GPG Key ID: 5B58F95EC95965D8

View File

@ -7,8 +7,11 @@ use std::str::from_utf8_unchecked;
use ffi::*;
use libc::{c_char, c_int};
// Export POSIX error codes so that users can do something like `if error ==
// Error::Other { errno: EAGAIN }`.
// Export POSIX error codes so that users can do something like
//
// if error == (Error::Other { errno: EAGAIN }) {
// ...
// }
pub use libc::{
E2BIG, EACCES, EADDRINUSE, EADDRNOTAVAIL, EAFNOSUPPORT, EAGAIN, EALREADY, EBADF, EBADMSG,
EBUSY, ECANCELED, ECHILD, ECONNABORTED, ECONNREFUSED, ECONNRESET, EDEADLK, EDESTADDRREQ, EDOM,