File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
9797- Exposed all fcntl(2) operations at the module level, so they can be
9898 imported direclty instead of via ` FcntlArg ` enum.
9999 ([ #541 ] ( https://github.com/nix-rust/nix/pull/541 ) )
100+ - Removed ` revents ` argument from ` PollFd::new() ` as it's an output argument and
101+ will be overwritten regardless of value.
102+ ([ #542 ] ( https://github.com/nix-rust/nix/pull/542 )
100103
101104### Fixed
102105- Fixed multiple issues with Unix domain sockets on non-Linux OSes
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ pub struct PollFd {
1313}
1414
1515impl PollFd {
16- pub fn new ( fd : libc:: c_int , events : EventFlags , revents : EventFlags ) -> PollFd {
16+ pub fn new ( fd : libc:: c_int , events : EventFlags ) -> PollFd {
1717 PollFd {
1818 pollfd : libc:: pollfd {
1919 fd : fd,
2020 events : events. bits ( ) ,
21- revents : revents . bits ( ) ,
21+ revents : EventFlags :: empty ( ) . bits ( ) ,
2222 } ,
2323 }
2424 }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use nix::unistd::{write, pipe};
44#[ test]
55fn test_poll ( ) {
66 let ( r, w) = pipe ( ) . unwrap ( ) ;
7- let mut fds = [ PollFd :: new ( r, POLLIN , EventFlags :: empty ( ) ) ] ;
7+ let mut fds = [ PollFd :: new ( r, POLLIN ) ] ;
88
99 let nfds = poll ( & mut fds, 100 ) . unwrap ( ) ;
1010 assert_eq ! ( nfds, 0 ) ;
You can’t perform that action at this time.
0 commit comments