This commit is contained in:
Stjepan Glavina 2020-09-27 23:39:25 +02:00
parent ae47f9f5d0
commit ba08b6a3ab
1 changed files with 2 additions and 5 deletions

View File

@ -434,7 +434,7 @@ impl Source {
let mut index = None;
let mut _guard = None;
future::poll_fn(move |cx| {
future::poll_fn(|cx| {
let mut state = self.state.lock().unwrap();
// Check if the reactor has delivered a readability event.
@ -478,10 +478,7 @@ impl Source {
// Remember the current ticks.
if ticks.is_none() {
ticks = Some((
Reactor::get().ticker.load(Ordering::SeqCst),
state[READ].tick,
));
ticks = Some((Reactor::get().ticker(), state[READ].tick));
}
Poll::Pending