summaryrefslogtreecommitdiff
path: root/test/test_poll.rs
diff options
context:
space:
mode:
authorBryant Mairs <bryant@mai.rs>2017-02-28 11:05:10 -0800
committerBryant Mairs <bryant@mai.rs>2017-03-02 09:52:33 -0800
commit80453b9139d5a035efaac2e963838676dcd04c37 (patch)
tree84504663f9bc529df624a3b595cb7c750dd00c1c /test/test_poll.rs
parent13deb619c3e0bdf490511cedd848e60633ca3b2d (diff)
downloadnix-80453b9139d5a035efaac2e963838676dcd04c37.zip
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.
Diffstat (limited to 'test/test_poll.rs')
-rw-r--r--test/test_poll.rs2
1 files changed, 1 insertions, 1 deletions
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);