Bump to tokio 0.3 and hyper 0.14

This commit is contained in:
Maxime Bedard
2020-11-12 20:31:19 -05:00
parent be4faf944b
commit 4026d92cf6
3 changed files with 7 additions and 7 deletions

View File

@@ -14,20 +14,20 @@ edition = "2018"
base64 = "0.12"
chrono = { version = "0.4", features = ["serde"] }
http = "0.2"
hyper = "0.13.5"
hyper-rustls = "0.20"
hyper = { git = "https://github.com/hyperium/hyper" }
hyper-rustls = { git = "https://github.com/messense/hyper-rustls", branch = "tokio-0-3" }
log = "0.4"
rustls = "0.17"
rustls = "0.18"
seahash = "4"
serde = {version = "1.0", features = ["derive"]}
serde_json = "1.0"
tokio = { version = "0.2", features = ["fs", "macros", "io-std", "time"] }
tokio = { version = "0.3", features = ["fs", "macros", "io-std", "io-util", "time", "sync", "rt"] }
url = "2"
percent-encoding = "2"
futures = "0.3"
[dev-dependencies]
httptest = "0.11.1"
httptest = { git = "https://github.com/maximebedard/httptest", branch = "bump-tokio-hyper" }
env_logger = "0.7"
tempfile = "3.1"

View File

@@ -80,7 +80,7 @@ impl DeviceFlow {
let mut interval = device_auth_resp.interval;
log::debug!("Polling every {:?} for device token", interval);
loop {
tokio::time::delay_for(interval).await;
tokio::time::sleep(interval).await;
interval = match Self::poll_token(
&app_secret,
hyper_client,

View File

@@ -10,7 +10,7 @@ use std::future::Future;
use std::path::PathBuf;
use std::pin::Pin;
use httptest::{mappers::*, responders::json_encoded, Expectation, Server};
use httptest::{matchers::*, responders::json_encoded, Expectation, Server};
use hyper::client::connect::HttpConnector;
use hyper::Uri;
use hyper_rustls::HttpsConnector;