We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea8dffe commit abf696aCopy full SHA for abf696a
examples/http_proxy.rs
@@ -90,9 +90,8 @@ async fn proxy(
90
} else {
91
let host = req.uri().host().expect("uri has no host");
92
let port = req.uri().port_u16().unwrap_or(80);
93
- let addr = format!("{}:{}", host, port);
94
95
- let stream = TcpStream::connect(addr).await.unwrap();
+ let stream = TcpStream::connect((host, port)).await.unwrap();
96
let io = TokioIo::new(stream);
97
98
let (mut sender, conn) = Builder::new()
0 commit comments