chore(tutorials): Add .await after client connect call (#109)

Both tutorials were missing .await on the client connect call, causing the compiler to issue errors.
Thanks for alce#6260 on the #tonic-users discord channel for providing the answer.
This commit is contained in:
Wilcov
2019-10-31 17:54:21 -04:00
committed by Lucio Franco
parent 3a39b1e7c8
commit c9b7523a5b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -291,7 +291,7 @@ use hello_world::{client::GreeterClient, HelloRequest};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = GreeterClient::connect("http://[::1]:50051")?;
let mut client = GreeterClient::connect("http://[::1]:50051").await?;
let request = tonic::Request::new(HelloRequest {
name: "Tonic".into(),
+1 -1
View File
@@ -615,7 +615,7 @@ use route_guide::{client::RouteGuideClient, Point, Rectangle, RouteNote};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = RouteGuideClient::connect("http://[::1]:10000")?;
let mut client = RouteGuideClient::connect("http://[::1]:10000").await?;
Ok(())
}