Skip to content

Commit 1eeb101

Browse files
committed
Fixing example
1 parent 980a1f7 commit 1eeb101

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/future/future/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,10 @@ extension_trait! {
364364
# Example
365365
```
366366
# async_std::task::block_on(async {
367-
#
367+
#
368+
use async_std::prelude::*;
369+
use async_std::future;
370+
368371
let fut = future::ready(0);
369372
let dur = Duration::from_millis(100);
370373
let res = fut.timeout(dur).await;

0 commit comments

Comments
 (0)