summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2017-07-20 20:00:00 +0200
committerJonas Schievink <jonasschievink@gmail.com>2017-12-04 20:29:40 +0100
commit512c35121e62062a802dadd787ee3dbda340a624 (patch)
tree3422316250d96771736e1c0b4666f2b57b3d49fc /src/lib.rs
parent86ebf7b0eac4cd0d092b816060042c55ca8871c5 (diff)
downloadnix-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.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib.rs b/src/lib.rs
index cadc7fb4..a51c5aa4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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 {