From d49e6ae1b3817d49e0413232d705dc64232f27db Mon Sep 17 00:00:00 2001 From: Christian Vallentin Date: Tue, 11 Feb 2020 16:56:32 +0100 Subject: Fixed typos in examples (#2231) --- examples/chat.rs | 6 +++--- examples/udp-codec.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/chat.rs b/examples/chat.rs index e1da5f32..fac43cbf 100644 --- a/examples/chat.rs +++ b/examples/chat.rs @@ -71,7 +71,7 @@ async fn main() -> Result<(), Box> { // Spawn our handler to be run asynchronously. tokio::spawn(async move { if let Err(e) = process(state, stream, addr).await { - println!("an error occured; error = {:?}", e); + println!("an error occurred; error = {:?}", e); } }); } @@ -175,7 +175,7 @@ impl Stream for Peer { // We've received a message we should broadcast to others. Some(Ok(message)) => Some(Ok(Message::Broadcast(message))), - // An error occured. + // An error occurred. Some(Err(e)) => Some(Err(e)), // The stream has been exhausted. @@ -236,7 +236,7 @@ async fn process( } Err(e) => { println!( - "an error occured while processing messages for {}; error = {:?}", + "an error occurred while processing messages for {}; error = {:?}", username, e ); } diff --git a/examples/udp-codec.rs b/examples/udp-codec.rs index dc30394f..8b64cbc3 100644 --- a/examples/udp-codec.rs +++ b/examples/udp-codec.rs @@ -46,7 +46,7 @@ async fn main() -> Result<(), Box> { // Run both futures simultaneously of `a` and `b` sending messages back and forth. match futures::future::try_join(a, b).await { - Err(e) => println!("an error occured; error = {:?}", e), + Err(e) => println!("an error occurred; error = {:?}", e), _ => println!("done!"), } -- cgit v1.2.3