summaryrefslogtreecommitdiffstats
path: root/tokio-test
diff options
context:
space:
mode:
authorJuan Alvarez <j@yabit.io>2020-10-08 22:35:12 -0500
committerGitHub <noreply@github.com>2020-10-08 20:35:12 -0700
commit60d81bbe10faf344ea18438a1c5ecb9173e6ec52 (patch)
tree4a6b64401944b62ffa872147e5738eb28e70d4ec /tokio-test
parentb704c53b9cc76eaf8c9c6585f8444c4515d27728 (diff)
time: rename `Delay` future to `Sleep` (#2932)
Diffstat (limited to 'tokio-test')
-rw-r--r--tokio-test/src/io.rs4
-rw-r--r--tokio-test/tests/block_on.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/tokio-test/src/io.rs b/tokio-test/src/io.rs
index 3d04a58a..7cfad2ec 100644
--- a/tokio-test/src/io.rs
+++ b/tokio-test/src/io.rs
@@ -20,7 +20,7 @@
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
use tokio::sync::mpsc;
-use tokio::time::{self, Delay, Duration, Instant};
+use tokio::time::{self, Duration, Instant, Sleep};
use futures_core::ready;
use std::collections::VecDeque;
@@ -67,7 +67,7 @@ enum Action {
struct Inner {
actions: VecDeque<Action>,
waiting: Option<Instant>,
- sleep: Option<Delay>,
+ sleep: Option<Sleep>,
read_wait: Option<Waker>,
rx: mpsc::UnboundedReceiver<Action>,
}
diff --git a/tokio-test/tests/block_on.rs b/tokio-test/tests/block_on.rs
index 280471df..efaaf510 100644
--- a/tokio-test/tests/block_on.rs
+++ b/tokio-test/tests/block_on.rs
@@ -18,7 +18,7 @@ fn async_fn() {
}
#[test]
-fn test_delay() {
+fn test_sleep() {
let deadline = Instant::now() + Duration::from_millis(100);
block_on(async {