update the docs of net::*::bind

This commit is contained in:
Simon Bernier St-Pierre
2016-09-10 19:12:30 -04:00
parent 00fb7ea4a3
commit 32ccf255b5
2 changed files with 3 additions and 6 deletions
+2 -3
View File
@@ -27,9 +27,8 @@ pub struct Incoming {
impl TcpListener {
/// Create a new TCP listener associated with this event loop.
///
/// The TCP listener will bind to the provided `addr` address, if available,
/// and will be returned as a future. The returned future, if resolved
/// successfully, can then be used to accept incoming connections.
/// The TCP listener will bind to the provided `addr` address, if available.
/// If the result is `Ok`, the socket has successfully bound.
pub fn bind(addr: &SocketAddr, handle: &Handle) -> io::Result<TcpListener> {
let l = try!(mio::tcp::TcpListener::bind(addr));
TcpListener::new(l, handle)