Skip to content

Commit 3c0f5c7

Browse files
kwannoelmxinden
andauthored
src/tutorial.rs: Display ping events (#2234)
Co-authored-by: Max Inden <mail@max-inden.de>
1 parent 6f7a19e commit 3c0f5c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tutorial.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@
304304
//!
305305
//! block_on(future::poll_fn(move |cx| loop {
306306
//! match swarm.poll_next_unpin(cx) {
307-
//! Poll::Ready(Some(event)) => {
308-
//! if let SwarmEvent::NewListenAddr { address, .. }= event {
309-
//! println!("Listening on {:?}", address);
310-
//! }
307+
//! Poll::Ready(Some(event)) => match event {
308+
//! SwarmEvent::NewListenAddr { address, .. } => println!("Listening on {:?}", address),
309+
//! SwarmEvent::Behaviour(event) => println!("{:?}", event),
310+
//! _ => {}
311311
//! },
312312
//! Poll::Ready(None) => return Poll::Ready(()),
313313
//! Poll::Pending => return Poll::Pending

0 commit comments

Comments
 (0)