mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
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:
committed by
Alex Crichton
parent
f4ec9a6360
commit
ae627db266
@@ -42,7 +42,7 @@ fn echo_server() {
|
||||
});
|
||||
|
||||
let future = srv.incoming()
|
||||
.map(|s| s.0.split())
|
||||
.map(|s| s.split())
|
||||
.map(|(a, b)| copy(a, b).map(|_| ()))
|
||||
.buffered(10)
|
||||
.take(2)
|
||||
|
||||
Reference in New Issue
Block a user