mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
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:
@ -152,7 +152,7 @@ fn run_dialer(opts: DialerOpts) -> Result<(), Box<Error>> {
|
||||
|
||||
control.dial(address, transport.with_upgrade(echo)).map_err(|_| "failed to dial")?;
|
||||
|
||||
tokio_current_thread::block_on_all(future).map_err(From::from)
|
||||
tokio_current_thread::block_on_all(future.for_each(|_| Ok(()))).map_err(From::from)
|
||||
}
|
||||
|
||||
fn run_listener(opts: ListenerOpts) -> Result<(), Box<Error>> {
|
||||
@ -206,7 +206,7 @@ fn run_listener(opts: ListenerOpts) -> Result<(), Box<Error>> {
|
||||
});
|
||||
|
||||
control.listen_on(opts.listen).map_err(|_| "failed to listen")?;
|
||||
tokio_current_thread::block_on_all(future).map_err(From::from)
|
||||
tokio_current_thread::block_on_all(future.for_each(|_| Ok(()))).map_err(From::from)
|
||||
}
|
||||
|
||||
// Custom parsers ///////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user