From 80453b9139d5a035efaac2e963838676dcd04c37 Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Tue, 28 Feb 2017 11:05:10 -0800 Subject: Remove revents from PollFd::new revents is an output field so regardless of what value it is set to it will be overwritten by many of the function calls that take a PollFd. The only value that makes sense for the caller to pass in in `EventFlags::empty()` so we just hardcode that instead of making the caller do it. --- test/test_poll.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_poll.rs b/test/test_poll.rs index 13a95d2c..6d30f265 100644 --- a/test/test_poll.rs +++ b/test/test_poll.rs @@ -4,7 +4,7 @@ use nix::unistd::{write, pipe}; #[test] fn test_poll() { let (r, w) = pipe().unwrap(); - let mut fds = [PollFd::new(r, POLLIN, EventFlags::empty())]; + let mut fds = [PollFd::new(r, POLLIN)]; let nfds = poll(&mut fds, 100).unwrap(); assert_eq!(nfds, 0); -- cgit v1.2.3