diff --git a/README.md b/README.md index 96da841..d38d75e 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ races! Here's a small service. ```rust -#![feature(arbitrary_self_types, await_macro, async_await, proc_macro_hygiene)] +#![feature(arbitrary_self_types, async_await, proc_macro_hygiene)] use futures::{ @@ -103,17 +103,17 @@ async fn run() -> io::Result<()> { tokio_executor::spawn(server.unit_error().boxed().compat()); - let transport = await!(bincode_transport::connect(&addr))?; + let transport = bincode_transport::connect(&addr).await?; // new_stub is generated by the service! macro. Like Server, it takes a config and any // Transport as input, and returns a Client, also generated by the macro. // by the service mcro. - let mut client = await!(new_stub(client::Config::default(), transport))?; + let mut client = new_stub(client::Config::default(), transport).await?; // The client has an RPC method for each RPC defined in service!. It takes the same args // as defined, with the addition of a Context, which is always the first arg. The Context // specifies a deadline and trace information which can be helpful in debugging requests. - let hello = await!(client.hello(context::current(), "Stim".to_string()))?; + let hello = client.hello(context::current(), "Stim".to_string()).await?; println!("{}", hello);