diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -20,7 +20,7 @@ extern crate nix_test as nixtest; // Re-exports pub use libc::{c_int, c_void}; -pub use errno::{Errno, Result}; +pub use errno::Errno; pub mod errno; pub mod features; @@ -45,12 +45,12 @@ pub mod unistd; /* * - * ===== Error ===== + * ===== Result / Error ===== * */ use libc::c_char; -use std::ptr; +use std::{ptr, result}; use std::ffi::{CStr, OsStr}; use std::path::{Path, PathBuf}; use std::os::unix::ffi::OsStrExt; @@ -59,6 +59,8 @@ use std::fmt; use std::error; use libc::PATH_MAX; +pub type Result<T> = result::Result<T, Error>; + #[derive(Clone, Copy, Debug, PartialEq)] pub enum Error { Sys(errno::Errno), |