Merge pull request #73 from U007D/patch-1

Clarify async fn return type
pull/62/head^2
Florian Gilcher 5 years ago committed by GitHub
commit 5fbeb52b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -102,7 +102,7 @@ While the `Future` trait has existed in Rust for a while, it was inconvenient to
Amazingly little difference, right? All we did is label the function `async` and insert 2 special commands: `.await`.
This function sets up a deferred computation. When this function is called, it will produce a `Future<Output=Result<String, io::Error>>` instead of immediately returning the `Result`. (Or, more precisely, generate a type for you that implements `Future<Output=Result<String, io::Error>>`.)
This function sets up a deferred computation. When this function is called, it will produce a `Future<Output=Result<String, io::Error>>` instead of immediately returning a `Result<String, io::Error>`. (Or, more precisely, generate a type for you that implements `Future<Output=Result<String, io::Error>>`.)
## What does `.await` do?

Loading…
Cancel
Save