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/).
97
97
- Exposed all fcntl(2) operations at the module level, so they can be
98
98
imported direclty instead of via ` FcntlArg ` enum.
99
99
([ #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 )
100
103
101
104
### Fixed
102
105
- 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 {
13
13
}
14
14
15
15
impl 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 {
17
17
PollFd {
18
18
pollfd : libc:: pollfd {
19
19
fd : fd,
20
20
events : events. bits ( ) ,
21
- revents : revents . bits ( ) ,
21
+ revents : EventFlags :: empty ( ) . bits ( ) ,
22
22
} ,
23
23
}
24
24
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use nix::unistd::{write, pipe};
4
4
#[ test]
5
5
fn test_poll ( ) {
6
6
let ( r, w) = pipe ( ) . unwrap ( ) ;
7
- let mut fds = [ PollFd :: new ( r, POLLIN , EventFlags :: empty ( ) ) ] ;
7
+ let mut fds = [ PollFd :: new ( r, POLLIN ) ] ;
8
8
9
9
let nfds = poll ( & mut fds, 100 ) . unwrap ( ) ;
10
10
assert_eq ! ( nfds, 0 ) ;
You can’t perform that action at this time.
0 commit comments