Correcting docs on function

pull/600/head
Miguel Pérez García 5 years ago
parent 84b6d2b276
commit 980a1f7834

@ -363,16 +363,18 @@ extension_trait! {
# Example # Example
``` ```
#async_std::task::block_on(async { # async_std::task::block_on(async {
let fut = future::ready(0); #
let dur = Duration::from_millis(100); let fut = future::ready(0);
let res = fut.timeout(dur).await; let dur = Duration::from_millis(100);
assert!(res.is_ok()); let res = fut.timeout(dur).await;
assert!(res.is_ok());
let fut = future::ready(0);
let dur = Duration::from_millis(100); let fut = future::ready(0);
let res = fut.timeout(dur).await; let dur = Duration::from_millis(100);
assert!(res.is_ok()) let res = fut.timeout(dur).await;
assert!(res.is_ok())
#
# }); # });
``` ```
"#] "#]

Loading…
Cancel
Save