Remove await!() macro from readme

This commit is contained in:
Tim Kuehn
2019-05-13 10:16:25 -07:00
parent 6745cee72c
commit ce9c057b1b

View File

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