Skip to content

Commit 081e222

Browse files
committed
fix(tcp): remove redundant format! macro call
1 parent 502cb6f commit 081e222

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/net/tcp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ impl TcpListener {
869869
/// use std::net::{TcpListener, TcpStream};
870870
///
871871
/// fn listen_on(port: u16) -> impl Iterator<Item = TcpStream> {
872-
/// let listener = TcpListener::bind(format!("127.0.0.1:{port}")).unwrap();
872+
/// let listener = TcpListener::bind(("127.0.0.1", port)).unwrap();
873873
/// listener.into_incoming()
874874
/// .filter_map(Result::ok) /* Ignore failed connections */
875875
/// }

0 commit comments

Comments
 (0)