Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
`foo(format!(...)).await` no longer compiles. There's a fix in
rust-lang/rust#64856, but this works around the problem.
  • Loading branch information
jonhoo authored Sep 30, 2019
1 parent 5fd5329 commit 5ce5a0a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tokio-fs/examples/std-echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

while let Some(line) = input.next().await {
let line = line?;
output.send(format!("OUT: {}", line)).await?;
error.send(format!("ERR: {}", line)).await?;
// https://github.com/rust-lang/rust/pull/64856
let s = format!("OUT: {}", line);
output.send(s).await?;
let s = format!("ERR: {}", line);
error.send(s).await?;
}
Ok(())
}
Expand Down

0 comments on commit 5ce5a0a

Please sign in to comment.