diff --git a/futures-util/src/stream/mod.rs b/futures-util/src/stream/mod.rs index 6a86bc3a7d..1f5a061eee 100644 --- a/futures-util/src/stream/mod.rs +++ b/futures-util/src/stream/mod.rs @@ -417,7 +417,7 @@ pub trait StreamExt: Stream { /// let (tx, rx) = mpsc::unbounded(); /// /// thread::spawn(move || { - /// for i in (1..=5) { + /// for i in 1..=5 { /// tx.unbounded_send(i).unwrap(); /// } /// }); diff --git a/futures-util/src/try_stream/mod.rs b/futures-util/src/try_stream/mod.rs index 5783af7d20..9a9f50113a 100644 --- a/futures-util/src/try_stream/mod.rs +++ b/futures-util/src/try_stream/mod.rs @@ -456,10 +456,10 @@ pub trait TryStreamExt: TryStream { /// use futures::stream::TryStreamExt; /// use std::thread; /// - /// let (mut tx, rx) = mpsc::unbounded(); + /// let (tx, rx) = mpsc::unbounded(); /// /// thread::spawn(move || { - /// for i in (1..=5) { + /// for i in 1..=5 { /// tx.unbounded_send(Ok(i)).unwrap(); /// } /// tx.unbounded_send(Err(6)).unwrap(); @@ -614,7 +614,7 @@ pub trait TryStreamExt: TryStream { /// use futures::stream::TryStreamExt; /// use std::thread; /// - /// let (mut tx, rx) = mpsc::unbounded::, ()>>(); + /// let (tx, rx) = mpsc::unbounded::, ()>>(); /// /// thread::spawn(move || { /// for i in (0..3).rev() {