Update hyper and other fixes

This commit is contained in:
Lucio Franco
2019-08-30 23:30:12 -04:00
parent 91a3c0965a
commit 0393172f95
8 changed files with 10 additions and 15 deletions
+2 -2
View File
@@ -24,9 +24,9 @@ path = "src/routeguide/client.rs"
[dependencies]
tonic = { path = "../tonic" }
hyper = { path = "../../hyper" }
hyper = { git = "https://github.com/hyperium/hyper" }
futures-preview = { version = "=0.3.0-alpha.18", default-features = false, features = ["alloc"]}
tokio = "=0.2.0-alpha.2"
tokio = "=0.2.0-alpha.4"
prost = "0.5"
prost-derive = "0.5"
bytes = "0.4"
+1 -1
View File
@@ -13,7 +13,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let origin = http::Uri::from_static("http://[::1]:50051");
let settings = Builder::new().http2_only(true).clone();
let mut maker = Connect::new(HttpConnector::new(1), settings);
let mut maker = Connect::new(HttpConnector::new(), settings);
let svc = maker.make_service(origin.clone()).await?;
-5
View File
@@ -22,13 +22,8 @@ impl MyGreeter {
let string = &self.data;
let when = tokio::clock::now() + Duration::from_millis(100);
Delay::new(when).await;
println!("My data: {:?}", string);
Delay::new(when).await;
let reply = hello_world::HelloReply {
message: "Zomg, it works!".into(),
};
+1 -1
View File
@@ -18,7 +18,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let origin = http::Uri::from_static("http://[::1]:10000");
let settings = Builder::new().http2_only(true).clone();
let mut maker = Connect::new(HttpConnector::new(1), settings);
let mut maker = Connect::new(HttpConnector::new(), settings);
let svc = maker.make_service(origin.clone()).await?;
let svc = AddOrigin::new(svc, origin);
+2 -2
View File
@@ -13,14 +13,14 @@ name = "server"
path = "src/bin/server.rs"
[dependencies]
tokio = "=0.2.0-alpha.2"
tokio = "=0.2.0-alpha.4"
tonic = { path = "../tonic" }
prost = "0.5"
prost-derive = "0.5"
bytes = "0.4"
http = "0.1"
futures-util-preview = "=0.3.0-alpha.18"
hyper = { path = "../../hyper" }
hyper = { git = "https://github.com/hyperium/hyper" }
console = "0.7"
structopt = "0.2"
+2 -2
View File
@@ -29,7 +29,7 @@ pub async fn create(addr: SocketAddr) -> Result<Client, Box<dyn std::error::Erro
let origin = http::Uri::from_shared(format!("http://{}", addr).into()).unwrap();
let settings = Builder::new().http2_only(true).clone();
let mut maker = Connect::new(HttpConnector::new(1), settings);
let mut maker = Connect::new(HttpConnector::new(), settings);
let svc = maker.make_service(origin.clone()).await?;
let svc = AddOrigin::new(svc, origin);
@@ -43,7 +43,7 @@ pub async fn create_unimplemented(
let origin = http::Uri::from_shared(format!("http://{}", addr).into()).unwrap();
let settings = Builder::new().http2_only(true).clone();
let mut maker = Connect::new(HttpConnector::new(1), settings);
let mut maker = Connect::new(HttpConnector::new(), settings);
let svc = maker.make_service(origin.clone()).await?;
let svc = AddOrigin::new(svc, origin);
+1 -1
View File
@@ -15,6 +15,6 @@ serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
[dev-dependencies]
tokio = "=0.2.0-alpha.2"
tokio = "=0.2.0-alpha.4"
tonic = { path = "../tonic" }
futures-preview = "=0.3.0-alpha.18"
+1 -1
View File
@@ -17,7 +17,7 @@ bytes = "0.4.7"
prost = "0.5"
percent-encoding = "1.0.1"
tower-service = "=0.3.0-alpha.1"
tokio-codec = "=0.2.0-alpha.2"
tokio-codec = "=0.2.0-alpha.4"
# async-stream = "0.1.0"
async-stream = { path = "../../async-stream/async-stream" }
http-body = "0.2.0-alpha.1"