summaryrefslogtreecommitdiffstats
path: root/examples/chat.rs
diff options
context:
space:
mode:
authorChristian Vallentin <vallentinsource@gmail.com>2020-02-11 16:56:32 +0100
committerGitHub <noreply@github.com>2020-02-11 10:56:32 -0500
commitd49e6ae1b3817d49e0413232d705dc64232f27db (patch)
tree2737217cf082b6366588e0025b5ccacdb59d1c1f /examples/chat.rs
parent874264a4ef35073d86cc49ca8c4b19855bf72e11 (diff)
Fixed typos in examples (#2231)
Diffstat (limited to 'examples/chat.rs')
-rw-r--r--examples/chat.rs6
1 files changed, 3 insertions, 3 deletions
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<dyn Error>> {
// 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
);
}