This commit is contained in:
parent
b7d9d19c4c
commit
1e8f9da839
@ -1,6 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
use std::net::SocketAddr;
|
||||
use std::net::ToSocketAddrs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use std::io;
|
||||
|
||||
@ -36,7 +36,9 @@ enum Node {
|
||||
}
|
||||
|
||||
fn parse_connection_address(arg: &str) -> io::Result<SocketAddr> {
|
||||
let mut addrs = arg.to_socket_addrs().or_else(|_| (arg, DEFAULT_PORT).to_socket_addrs())?;
|
||||
let mut addrs = arg
|
||||
.to_socket_addrs()
|
||||
.or_else(|_| (arg, DEFAULT_PORT).to_socket_addrs())?;
|
||||
Ok(addrs.next().expect("no socket addr"))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user