diff --git a/src/concurrency/async-control-flow/channels.rs b/src/concurrency/async-control-flow/channels.rs index 3aefa055..19e49e6c 100644 --- a/src/concurrency/async-control-flow/channels.rs +++ b/src/concurrency/async-control-flow/channels.rs @@ -1,7 +1,7 @@ -use tokio::sync::mpsc::{self, Receiver}; +use tokio::sync::mpsc; -async fn ping_handler(mut input: Receiver<()>) { - let mut count: usize = 0; +async fn ping_handler(mut input: mpsc::Receiver<()>) { + let mut count = 0; while let Some(_) = input.recv().await { count += 1;