From 980a1f7834070b1ff7eddc1d8a710840315e98b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20P=C3=A9rez=20Garc=C3=ADa?= Date: Tue, 17 Dec 2019 22:46:25 -0600 Subject: [PATCH] Correcting docs on function --- src/future/future/mod.rs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/future/future/mod.rs b/src/future/future/mod.rs index e302175e..bd972899 100644 --- a/src/future/future/mod.rs +++ b/src/future/future/mod.rs @@ -363,16 +363,18 @@ extension_trait! { # Example ``` - #async_std::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()); - - let fut = future::ready(0); - let dur = Duration::from_millis(100); - let res = fut.timeout(dur).await; - assert!(res.is_ok()) + # async_std::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()); + + let fut = future::ready(0); + let dur = Duration::from_millis(100); + let res = fut.timeout(dur).await; + assert!(res.is_ok()) + # # }); ``` "#]