Skip to content

Commit eecf3d1

Browse files
authored
Merge pull request #58 from oberien/master
fix(examples): Fix typos in chat example
2 parents bc2f857 + 7cf7833 commit eecf3d1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/chat.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ fn main() {
3838
let srv = socket.incoming().for_each(move |(stream, addr)| {
3939
println!("New Connection: {}", addr);
4040

41-
// Create a channel for for our stream, which other sockets will use to
42-
// send us message. Then register our address with the stream to send
41+
// Create a channel for our stream, which other sockets will use to
42+
// send us messages. Then register our address with the stream to send
4343
// data to us.
4444
let (tx, rx) = tokio_core::channel::channel(&handle).unwrap();
4545
connections.borrow_mut().insert(addr, tx);
@@ -85,7 +85,7 @@ fn main() {
8585
let conns = connections.borrow_mut();
8686
if let Ok(msg) = message {
8787
// For each open connection except the sender, send the
88-
// string via the channel
88+
// string via the channel.
8989
let iter = conns.iter()
9090
.filter(|&(&k, _)| k != addr)
9191
.map(|(_, v)| v);
@@ -111,9 +111,9 @@ fn main() {
111111
(socket_reader, socket_writer)
112112
});
113113

114-
// Now that we've got futures representing each half of the socket, join
115-
// them together and then spawn off the result. Here we use the `select`
116-
// combinator to wait for either half to be done to tear down the other.
114+
// Now that we've got futures representing each half of the socket, we
115+
// use the `select` combinator to wait for either half to be done to
116+
// tear down the other. Then we spawn off the result.
117117
let connections = connections.clone();
118118
let addr = addr;
119119
handle.spawn(pair.and_then(|(reader, writer)| {

0 commit comments

Comments
 (0)