summaryrefslogtreecommitdiff
path: root/test/sys/test_epoll.rs
diff options
context:
space:
mode:
authorBryant Mairs <bryantmairs@google.com>2017-11-21 22:27:15 -0800
committerBryant Mairs <bryantmairs@google.com>2017-12-02 10:46:34 -0800
commite1baab9dc132f18e13f446df0271a5e46723848d (patch)
tree3e4e6714d843edc493dfc3cf879d659bbd264e65 /test/sys/test_epoll.rs
parentd374a1ecd3f69027a2ce28e87806f459ef3f9105 (diff)
downloadnix-e1baab9dc132f18e13f446df0271a5e46723848d.zip
Upgrade to Bitflags 1.0
The libc_bitflags! macro was replaced with a non-recursive one supporting only public structs. I could not figure out how to make the old macro work with the upgrade, so I reworked part of the bitflags! macro directly to suit our needs, much as the original recursive macro was made. There are no uses of this macro for non-public structs, so this is not a problem for internal code.
Diffstat (limited to 'test/sys/test_epoll.rs')
-rw-r--r--test/sys/test_epoll.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/sys/test_epoll.rs b/test/sys/test_epoll.rs
index a73fea6d..e32a4e23 100644
--- a/test/sys/test_epoll.rs
+++ b/test/sys/test_epoll.rs
@@ -1,5 +1,4 @@
-use nix::sys::epoll::{EpollCreateFlags, EpollOp, EpollEvent};
-use nix::sys::epoll::{EPOLLIN, EPOLLERR};
+use nix::sys::epoll::{EpollCreateFlags, EpollFlags, EpollOp, EpollEvent};
use nix::sys::epoll::{epoll_create1, epoll_ctl};
use nix::{Error, Errno};
@@ -18,7 +17,7 @@ pub fn test_epoll_errno() {
#[test]
pub fn test_epoll_ctl() {
let efd = epoll_create1(EpollCreateFlags::empty()).unwrap();
- let mut event = EpollEvent::new(EPOLLIN | EPOLLERR, 1);
+ let mut event = EpollEvent::new(EpollFlags::EPOLLIN | EpollFlags::EPOLLERR, 1);
epoll_ctl(efd, EpollOp::EpollCtlAdd, 1, &mut event).unwrap();
epoll_ctl(efd, EpollOp::EpollCtlDel, 1, None).unwrap();
}