diff options
author | Jonas Schievink <jonasschievink@gmail.com> | 2017-07-20 20:00:00 +0200 |
---|---|---|
committer | Jonas Schievink <jonasschievink@gmail.com> | 2017-12-04 20:29:40 +0100 |
commit | 512c35121e62062a802dadd787ee3dbda340a624 (patch) | |
tree | 3422316250d96771736e1c0b4666f2b57b3d49fc /src/lib.rs | |
parent | 86ebf7b0eac4cd0d092b816060042c55ca8871c5 (diff) | |
download | nix-512c35121e62062a802dadd787ee3dbda340a624.zip |
Stop reexporting `Errno` and its variants
cc #664 (unsure if this is everything needed)
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -25,7 +25,7 @@ extern crate nix_test as nixtest; pub extern crate libc; -pub use errno::Errno; +use errno::Errno; pub mod errno; pub mod features; @@ -96,24 +96,24 @@ pub enum Error { impl Error { /// Create a nix Error from a given errno - pub fn from_errno(errno: errno::Errno) -> Error { + pub fn from_errno(errno: Errno) -> Error { Error::Sys(errno) } /// Get the current errno and convert it to a nix Error pub fn last() -> Error { - Error::Sys(errno::Errno::last()) + Error::Sys(Errno::last()) } /// Create a new invalid argument error (`EINVAL`) pub fn invalid_argument() -> Error { - Error::Sys(errno::EINVAL) + Error::Sys(Errno::EINVAL) } } -impl From<errno::Errno> for Error { - fn from(errno: errno::Errno) -> Error { Error::from_errno(errno) } +impl From<Errno> for Error { + fn from(errno: Errno) -> Error { Error::from_errno(errno) } } impl From<std::string::FromUtf8Error> for Error { |