Change net::Incoming signature to match std. (#89)

std's `Incoming` iterator yields `TcpStream` instances. This patch
updates the `Incoming` future to match this signature.

This changes the yielded value from `(TcpStream, SocketAddr)` ->
`TcpStream`.
This commit is contained in:
Carl Lerche
2018-01-30 15:01:34 -06:00
committed by Alex Crichton
parent f4ec9a6360
commit ae627db266
18 changed files with 31 additions and 28 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ fn main() {
println!("Listening for connections on {}", addr);
let clients = listener.incoming();
let welcomes = clients.and_then(|(socket, _peer_addr)| {
let welcomes = clients.and_then(|socket| {
tokio_io::io::write_all(socket, b"Hello!\n")
});
let server = welcomes.for_each(|(_socket, _welcome)| {