Auto merge of #109995 - enkron:u/enkron/substitute-hardcoded-port-num-in-listen-on-fn, r=the8472
chore(tcp): change a hardcoded port number in a doctest to `port` var The `listen_on` function in the example has a `port` option but doesn't use it
This commit is contained in:
commit
c49c4fba11
@ -869,7 +869,7 @@ pub fn incoming(&self) -> Incoming<'_> {
|
||||
/// use std::net::{TcpListener, TcpStream};
|
||||
///
|
||||
/// fn listen_on(port: u16) -> impl Iterator<Item = TcpStream> {
|
||||
/// let listener = TcpListener::bind("127.0.0.1:80").unwrap();
|
||||
/// let listener = TcpListener::bind(("127.0.0.1", port)).unwrap();
|
||||
/// listener.into_incoming()
|
||||
/// .filter_map(Result::ok) /* Ignore failed connections */
|
||||
/// }
|
||||
|
Loading…
Reference in New Issue
Block a user