From 9193357d60c72e821cdb1687cdf94bb2cec89770 Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Sat, 20 Feb 2016 01:29:22 -0800 Subject: [PATCH] Fix the README example. It broke again. :( --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f415d823..4180735c 100644 --- a/README.md +++ b/README.md @@ -36,17 +36,18 @@ mod hello_service { rpc hello(name: String) -> String; } } +use hello_service::Service as HelloService; -struct HelloService; -impl hello_service::Service for HelloService { +struct HelloServer; +impl HelloService for HelloServer { fn hello(&self, name: String) -> String { format!("Hello, {}!", name) } } fn main() { - let server_handle = HelloService.spawn("0.0.0.0:0").unwrap(); - let client = hello_service::Client::new(server_handle.local_addr(), None).unwrap(); + let server_handle = HelloServer.spawn("0.0.0.0:0").unwrap(); + let client = hello_service::Client::new(server_handle.local_addr()).unwrap(); assert_eq!("Hello, Mom!", client.hello("Mom".into()).unwrap()); drop(client); server_handle.shutdown();