From 081e222d99be8a5dd795244abafd64cc05e3d00e Mon Sep 17 00:00:00 2001 From: Sergei Belokon Date: Sat, 8 Apr 2023 08:19:47 +1000 Subject: [PATCH] fix(tcp): remove redundant `format!` macro call --- library/std/src/net/tcp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/net/tcp.rs b/library/std/src/net/tcp.rs index 6a5f2923210..4b42ad65ee6 100644 --- a/library/std/src/net/tcp.rs +++ b/library/std/src/net/tcp.rs @@ -869,7 +869,7 @@ pub fn incoming(&self) -> Incoming<'_> { /// use std::net::{TcpListener, TcpStream}; /// /// fn listen_on(port: u16) -> impl Iterator { - /// let listener = TcpListener::bind(format!("127.0.0.1:{port}")).unwrap(); + /// let listener = TcpListener::bind(("127.0.0.1", port)).unwrap(); /// listener.into_incoming() /// .filter_map(Result::ok) /* Ignore failed connections */ /// }