We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
format!
1 parent 502cb6f commit 081e222Copy full SHA for 081e222
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(format!("127.0.0.1:{port}")).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