mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
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.
This commit is contained in:
parent
5fd5329497
commit
5ce5a0a0e0
@ -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(())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user