swarm/: include ListenerId in SwarmEvents (#2123)

Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
Elena Frank
2021-07-08 11:41:33 +02:00
committed by GitHub
parent c1ef4bffd2
commit a414afd83c
14 changed files with 117 additions and 48 deletions

View File

@ -298,8 +298,8 @@
//! block_on(future::poll_fn(move |cx| loop {
//! match swarm.poll_next_unpin(cx) {
//! Poll::Ready(Some(event)) => {
//! if let SwarmEvent::NewListenAddr(addr) = event {
//! println!("Listening on {:?}", addr);
//! if let SwarmEvent::NewListenAddr { address, .. }= event {
//! println!("Listening on {:?}", address);
//! }
//! },
//! Poll::Ready(None) => return Poll::Ready(()),