mirror of https://github.com/stjepang/smol
Merge pull request #132 from stjepang/update-wepoll
Update wepoll-binding to 2.0.2
This commit is contained in:
commit
c311b6897f
|
@ -45,7 +45,7 @@ optional = true
|
||||||
nix = "0.17.0"
|
nix = "0.17.0"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
wepoll-binding = "2.0.0"
|
wepoll-binding = "2.0.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
futures = { version = "0.3.5", default-features = false, features = ["std"] }
|
futures = { version = "0.3.5", default-features = false, features = ["std"] }
|
||||||
|
|
|
@ -714,11 +714,9 @@ mod sys {
|
||||||
Events(wepoll_binding::Events::with_capacity(1000))
|
Events(wepoll_binding::Events::with_capacity(1000))
|
||||||
}
|
}
|
||||||
pub fn iter(&self) -> impl Iterator<Item = Event> + '_ {
|
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 {
|
self.0.iter().map(|ev| Event {
|
||||||
readable: true,
|
readable: ev.flags().intersects(read_flags()),
|
||||||
writable: true,
|
writable: ev.flags().intersects(write_flags()),
|
||||||
key: ev.data() as usize,
|
key: ev.data() as usize,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue