summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Gjengset <jon@thesquareplanet.com>2019-09-30 17:17:14 -0400
committerGitHub <noreply@github.com>2019-09-30 17:17:14 -0400
commit5ce5a0a0e0fa529a571796d62854a19282848e72 (patch)
tree4d5deb33e0aca201e1ede3bb1e2cc045248cd2f6
parent5fd5329497ca7982a376d8997bc1a8a41cd2db1c (diff)
Fix for rust-lang/rust#64477 (#1618)
`foo(format!(...)).await` no longer compiles. There's a fix in rust-lang/rust#64856, but this works around the problem.
-rw-r--r--tokio-fs/examples/std-echo.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tokio-fs/examples/std-echo.rs b/tokio-fs/examples/std-echo.rs
index 3b0086b9..311f1248 100644
--- a/tokio-fs/examples/std-echo.rs
+++ b/tokio-fs/examples/std-echo.rs
@@ -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(())
}