mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-30 01:05:31 +00:00
Correcting docs on function
This commit is contained in:
parent
84b6d2b276
commit
980a1f7834
1 changed files with 11 additions and 9 deletions
|
@ -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());
|
||||
# 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())
|
||||
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