Update futures-timer to version 2.

This removes the last dependencies to futures-preview.
This commit is contained in:
Toralf Wittner
2019-12-18 16:50:07 +01:00
parent f293594144
commit be8d811641
2 changed files with 3 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ ed25519-dalek = "1.0.0-pre.3"
failure = "0.1"
fnv = "1.0"
futures = { version = "0.3.1", features = ["compat", "io-compat", "executor", "thread-pool"] }
futures-timer = "0.3"
futures-timer = "2"
lazy_static = "1.2"
libsecp256k1 = { version = "0.3.1", optional = true }
log = "0.4"

View File

@@ -172,10 +172,9 @@ where
Poll::Ready(Err(err)) => return Poll::Ready(Err(TransportTimeoutError::Other(err))),
}
match TryFuture::try_poll(Pin::new(&mut this.timer), cx) {
match Pin::new(&mut this.timer).poll(cx) {
Poll::Pending => Poll::Pending,
Poll::Ready(Ok(())) => Poll::Ready(Err(TransportTimeoutError::Timeout)),
Poll::Ready(Err(err)) => Poll::Ready(Err(TransportTimeoutError::TimerError(err))),
Poll::Ready(()) => Poll::Ready(Err(TransportTimeoutError::Timeout))
}
}
}