rename sock -> listener in docs

Makes it much clearer for someone fairly new to rust (like me) to follow along when the same named variable aren't totally different things :)
This commit is contained in:
Ian Chiles 2017-02-08 20:23:54 +01:00 committed by GitHub
parent cecaad715d
commit 8a360f87f5

View File

@ -57,10 +57,10 @@
//!
//! // Bind the server's socket
//! let addr = "127.0.0.1:12345".parse().unwrap();
//! let sock = TcpListener::bind(&addr, &handle).unwrap();
//! let listener = TcpListener::bind(&addr, &handle).unwrap();
//!
//! // Pull out a stream of sockets for incoming connections
//! let server = sock.incoming().for_each(|(sock, _)| {
//! let server = listener.incoming().for_each(|(sock, _)| {
//! // Split up the reading and writing parts of the
//! // socket
//! let (reader, writer) = sock.split();