Remove Framed::split because it's now in futures

This commit is contained in:
Paul Colomiets
2016-11-21 19:33:07 +02:00
parent 4994f762a9
commit e27abd3841
3 changed files with 2 additions and 59 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ fn echo() {
let listener = TcpListener::bind(&"127.0.0.1:0".parse().unwrap(), &handle).unwrap();
let addr = listener.local_addr().unwrap();
let srv = listener.incoming().for_each(move |(socket, _)| {
let (stream, sink) = socket.framed(LineCodec).split();
let (sink, stream) = socket.framed(LineCodec).split();
handle.spawn(sink.send_all(stream).map(|_| ()).map_err(|_| ()));
Ok(())
});