From e1baab9dc132f18e13f446df0271a5e46723848d Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Tue, 21 Nov 2017 22:27:15 -0800 Subject: 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. --- test/sys/test_epoll.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/sys/test_epoll.rs') 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(); } -- cgit v1.2.3