Update wepoll-binding to 2.0.2

This commit is contained in:
Stjepan Glavina 2020-05-23 18:12:17 +02:00
parent 39e7a853ef
commit cee8acd7e5
2 changed files with 3 additions and 5 deletions

View File

@ -45,7 +45,7 @@ optional = true
nix = "0.17.0"
[target.'cfg(windows)'.dependencies]
wepoll-binding = "2.0.0"
wepoll-binding = "2.0.2"
[dev-dependencies]
futures = { version = "0.3.5", default-features = false, features = ["std"] }

View File

@ -714,11 +714,9 @@ mod sys {
Events(wepoll_binding::Events::with_capacity(1000))
}
pub fn iter(&self) -> impl Iterator<Item = Event> + '_ {
// wepoll doesn't report events so we have to assume both readability and writabilit
// events have been emitted.
self.0.iter().map(|ev| Event {
readable: true,
writable: true,
readable: ev.flags().intersects(read_flags()),
writable: ev.flags().intersects(write_flags()),
key: ev.data() as usize,
})
}