diff options
author | Carl Lerche <me@carllerche.com> | 2015-03-24 23:25:10 -0700 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2015-03-24 23:25:10 -0700 |
commit | 47d2332c3c388ecf094fc1d1890a223f3189f330 (patch) | |
tree | ee7bfae92f24d00e0732158f100caecd2f75c5f2 /src/sys/event.rs | |
parent | 2b60633c8bdd5359c317bb74e698777106befb85 (diff) | |
download | nix-47d2332c3c388ecf094fc1d1890a223f3189f330.zip |
NixResult -> nix::Result; NixError -> nix::Error
Diffstat (limited to 'src/sys/event.rs')
-rw-r--r-- | src/sys/event.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sys/event.rs b/src/sys/event.rs index efe54b19..9a0ede1e 100644 --- a/src/sys/event.rs +++ b/src/sys/event.rs @@ -5,7 +5,7 @@ use libc::{timespec, time_t, c_int, c_long, uintptr_t}; use errno::Errno; use fcntl::Fd; use std::fmt; -use {NixError, NixResult}; +use {Error, Result}; pub use self::ffi::kevent as KEvent; @@ -159,11 +159,11 @@ bitflags!( pub const EV_POLL: EventFlag = EV_FLAG0; pub const EV_OOBAND: EventFlag = EV_FLAG1; -pub fn kqueue() -> NixResult<Fd> { +pub fn kqueue() -> Result<Fd> { let res = unsafe { ffi::kqueue() }; if res < 0 { - return Err(NixError::Sys(Errno::last())); + return Err(Error::Sys(Errno::last())); } Ok(res) @@ -172,7 +172,7 @@ pub fn kqueue() -> NixResult<Fd> { pub fn kevent(kq: Fd, changelist: &[KEvent], eventlist: &mut [KEvent], - timeout_ms: usize) -> NixResult<usize> { + timeout_ms: usize) -> Result<usize> { // Convert ms to timespec let timeout = timespec { @@ -191,7 +191,7 @@ pub fn kevent(kq: Fd, }; if res < 0 { - return Err(NixError::Sys(Errno::last())); + return Err(Error::Sys(Errno::last())); } return Ok(res as usize) |