The SwarmFuture is now a Stream (#442)

* The SwarmFuture is now a Stream

* Return the produced future in the message

* Remove IncomingConnection event

* Pass error when failing to dial

* Fix loop break mistake

* Fix concern

* Rename SwarmFuture to SwarmEvents

* Increase type length limit

* Remove todo
This commit is contained in:
Pierre Krieger
2018-09-04 14:53:27 +02:00
committed by GitHub
parent ee9be6f0c9
commit 75ceba7809
11 changed files with 146 additions and 70 deletions

View File

@ -141,5 +141,5 @@ fn main() {
// `swarm_future` is a future that contains all the behaviour that we want, but nothing has
// actually started yet. Because we created the `TcpConfig` with tokio, we need to run the
// future through the tokio core.
tokio_current_thread::block_on_all(swarm_future).unwrap();
tokio_current_thread::block_on_all(swarm_future.for_each(|_| Ok(()))).unwrap();
}