Merge branch 'master' into patch-1

pull/73/head
Florian Gilcher 5 years ago committed by GitHub
commit 96b821b9f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,7 +17,7 @@ async fn read_file(path: &str) -> Result<String, io::Error> {
fn main() {
let reader_task = task::spawn(async {
let result = read_file("data.csv");
let result = read_file("data.csv").await;
match result {
Ok(s) => println!("{}", s),
Err(e) => println!("Error reading file: {:?}", e)
@ -33,7 +33,7 @@ This asks the runtime baked into `async_std` to execute the code that reads a fi
```rust
async {
let result = read_file("data.csv");
let result = read_file("data.csv").await;
match result {
Ok(s) => println!("{}", s),
Err(e) => println!("Error reading file: {:?}", e)

Loading…
Cancel
Save