Fix some final errors

staging
Florian Gilcher 5 years ago
parent b2fc92e5d6
commit 101979fcc3
No known key found for this signature in database
GPG Key ID: E7B51D33F8EBF61B

@ -37,7 +37,7 @@ pin-utils = "0.1.0-alpha.4"
slab = "0.4.2" slab = "0.4.2"
[dependencies.futures-preview] [dependencies.futures-preview]
version = "0.3.0-alpha.17" version = "0.3.0-alpha.18"
features = ["async-await", "nightly"] features = ["async-await", "nightly"]
[dev-dependencies] [dev-dependencies]

@ -135,18 +135,6 @@ async fn broker(mut events: Receiver<Event>) -> Result<()> {
} }
Ok(()) Ok(())
} }
fn spawn_and_log_error<F>(fut: F) -> task::JoinHandle<()>
where
F: Future<Output = Result<()>> + 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`. 1. Inside the `server`, we create the broker's channel and `task`.

@ -19,7 +19,6 @@ if Alice and Charley send two messages to Bob at the same time, Bob will see the
# net::TcpStream, # net::TcpStream,
# prelude::Stream, # prelude::Stream,
# }; # };
# use std::sync::Arc;
use futures::channel::mpsc; // 1 use futures::channel::mpsc; // 1
use futures::SinkExt; use futures::SinkExt;
use std::sync::Arc; use std::sync::Arc;

Loading…
Cancel
Save