forked from mirror/async-std
fixing format
This commit is contained in:
parent
4670388a56
commit
cc85533f7c
1 changed files with 4 additions and 4 deletions
|
@ -2,13 +2,13 @@
|
|||
|
||||
use std::time::Duration;
|
||||
|
||||
use async_std::prelude::*;
|
||||
use async_std::future;
|
||||
use async_std::prelude::*;
|
||||
use async_std::task;
|
||||
|
||||
#[test]
|
||||
fn should_timeout() {
|
||||
task::block_on(async {
|
||||
task::block_on(async {
|
||||
let fut = future::pending::<()>();
|
||||
let dur = Duration::from_millis(100);
|
||||
let res = fut.timeout(dur).await;
|
||||
|
@ -18,10 +18,10 @@ fn should_timeout() {
|
|||
|
||||
#[test]
|
||||
fn should_not_timeout() {
|
||||
task::block_on(async {
|
||||
task::block_on(async {
|
||||
let fut = future::ready(0);
|
||||
let dur = Duration::from_millis(100);
|
||||
let res = fut.timeout(dur).await;
|
||||
assert!(res.is_ok());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue