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.
.unwrap()
1 parent 1290819 commit 3568b60Copy full SHA for 3568b60
src/socks/v5.rs
@@ -198,7 +198,7 @@ impl Socks5Stream {
198
U: ToTargetAddr,
199
{
200
let mut socket = if let Some(timeout) = timeout {
201
- let addr = proxy.to_socket_addrs().unwrap().next().unwrap();
+ let addr = proxy.to_socket_addrs()?.next().unwrap();
202
TcpStream::connect_timeout(&addr, timeout)?
203
} else {
204
TcpStream::connect(proxy)?
0 commit comments