Skip to content

Commit 926d49a

Browse files
authored
Merge pull request #23 from kpp/update_readme
Update README to point to new futures-rs, use .await syntax
2 parents f4db853 + bf09ee2 commit 926d49a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
FOR LEARNING PURPOSES ONLY
1515

16-
This is a greatly simplified implementation of [Future combinators](https://docs.rs/futures-preview/0.3.0-alpha.13/futures/)
16+
This is a greatly simplified implementation of [Future combinators](https://docs.rs/futures-preview/0.3.0-alpha.18/futures/)
1717
like `FutureExt::map`, `TryFutureExt::and_then`...
1818

1919
# Requirements
@@ -71,9 +71,8 @@ To understand how combinators work by looking at clean source code. Compare:
7171
```rust
7272
pub async fn then<...>(future, f) -> ...
7373
{
74-
let future_result = await!(future);
75-
let new_future = f(future_result);
76-
await!(new_future)
74+
let new_future = f(future.await);
75+
new_future.await
7776
}
7877
```
7978

0 commit comments

Comments
 (0)