diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 8ff40902d25..ab4e973c0bb 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -26,7 +26,7 @@ pub async fn main() -> Result<(), Box> { let mut stream = TcpStream::connect("127.0.0.1:6142").await?; println!("created stream"); - let result = stream.write(b"hello world\n").await; + let result = stream.write_all(b"hello world\n").await; println!("wrote to stream; success={:?}", result.is_ok()); Ok(())