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);