We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 131211a + 081e222 commit c49c4fbCopy full SHA for c49c4fb
library/std/src/net/tcp.rs
@@ -869,7 +869,7 @@ impl TcpListener {
869
/// use std::net::{TcpListener, TcpStream};
870
///
871
/// fn listen_on(port: u16) -> impl Iterator<Item = TcpStream> {
872
- /// let listener = TcpListener::bind("127.0.0.1:80").unwrap();
+ /// let listener = TcpListener::bind(("127.0.0.1", port)).unwrap();
873
/// listener.into_incoming()
874
/// .filter_map(Result::ok) /* Ignore failed connections */
875
/// }
0 commit comments