Skip to content

Commit

Permalink
Merge pull request rust-lang#80 from dwrensha/update-echo
Browse files Browse the repository at this point in the history
futures-mio: update comment and simplify echo example
  • Loading branch information
alexcrichton authored Aug 20, 2016
2 parents 8e09aea + 1d14f3c commit 0de0eae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions futures-mio/src/bin/echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ fn main() {
println!("Listening on: {}", addr);

// Pull out the stream of incoming connections and then for each new
// one spin up a new task copying data. We put the `socket` into a
// `Arc` structure which then allows us to share it across the
// read/write halves with a small shim.
// one spin up a new task copying data.
//
// Finally we use the `io::copy` future to copy all data from the
// We use the `io::copy` future to copy all data from the
// reading half onto the writing half.
socket.incoming().for_each(|(socket, addr)| {
let socket = futures::lazy(|| futures::finished(TaskIo::new(socket)));
Expand Down

0 comments on commit 0de0eae

Please sign in to comment.