summaryrefslogtreecommitdiffstats
path: root/tokio/src/stream
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/stream')
-rw-r--r--tokio/src/stream/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tokio/src/stream/mod.rs b/tokio/src/stream/mod.rs
index 59e1482f..ec48392b 100644
--- a/tokio/src/stream/mod.rs
+++ b/tokio/src/stream/mod.rs
@@ -281,18 +281,18 @@ pub trait StreamExt: Stream {
/// tx1.send(2).await.unwrap();
///
/// // Let the other task send values
- /// time::delay_for(Duration::from_millis(20)).await;
+ /// time::sleep(Duration::from_millis(20)).await;
///
/// tx1.send(4).await.unwrap();
/// });
///
/// tokio::spawn(async move {
/// // Wait for the first task to send values
- /// time::delay_for(Duration::from_millis(5)).await;
+ /// time::sleep(Duration::from_millis(5)).await;
///
/// tx2.send(3).await.unwrap();
///
- /// time::delay_for(Duration::from_millis(25)).await;
+ /// time::sleep(Duration::from_millis(25)).await;
///
/// // Send the final value
/// tx2.send(5).await.unwrap();