Nest server and client in their own mods

This commit is contained in:
Lucio Franco
2019-09-06 17:52:41 -04:00
parent 9d44b02e1a
commit 8b548f2ea4
8 changed files with 77 additions and 30 deletions
+3 -1
View File
@@ -8,12 +8,14 @@ mod route_guide {
include!(concat!(env!("OUT_DIR"), "/routeguide.rs"));
}
use route_guide::client::RouteGuideClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let origin = http::Uri::from_static("http://[::1]:10000");
let svc = Channel::builder().build(origin)?;
let mut client = route_guide::RouteGuideClient::new(svc);
let mut client = RouteGuideClient::new(svc);
let start = Instant::now();