Fixing example

This commit is contained in:
Miguel Pérez García 2019-12-17 23:05:06 -06:00
parent 980a1f7834
commit 1eeb1019e9

View file

@ -365,6 +365,9 @@ extension_trait! {
```
# async_std::task::block_on(async {
#
use async_std::prelude::*;
use async_std::future;
let fut = future::ready(0);
let dur = Duration::from_millis(100);
let res = fut.timeout(dur).await;