diff --git a/Cargo.toml b/Cargo.toml index 6aabfec2..eba38cca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ pin-utils = "0.1.0-alpha.4" slab = "0.4.2" [dependencies.futures-preview] -version = "0.3.0-alpha.17" +version = "0.3.0-alpha.18" features = ["async-await", "nightly"] [dev-dependencies] diff --git a/docs/src/tutorial/all_together.md b/docs/src/tutorial/all_together.md index 178f5374..4e81cb20 100644 --- a/docs/src/tutorial/all_together.md +++ b/docs/src/tutorial/all_together.md @@ -135,18 +135,6 @@ async fn broker(mut events: Receiver) -> Result<()> { } Ok(()) } - -fn spawn_and_log_error(fut: F) -> task::JoinHandle<()> -where - F: Future> + Send + 'static, -{ - task::spawn(async move { - if let Err(e) = fut.await { - eprintln!("{}", e) - } - }) -} - ``` 1. Inside the `server`, we create the broker's channel and `task`. diff --git a/docs/src/tutorial/sending_messages.md b/docs/src/tutorial/sending_messages.md index 3184c266..465d6740 100644 --- a/docs/src/tutorial/sending_messages.md +++ b/docs/src/tutorial/sending_messages.md @@ -19,7 +19,6 @@ if Alice and Charley send two messages to Bob at the same time, Bob will see the # net::TcpStream, # prelude::Stream, # }; -# use std::sync::Arc; use futures::channel::mpsc; // 1 use futures::SinkExt; use std::sync::Arc;