apply fmt

This commit is contained in:
Alex 2021-10-18 12:59:55 +02:00
parent cbdd6ab215
commit de981aace0
No known key found for this signature in database
GPG key ID: EDABF9711E244EB1

View file

@ -80,10 +80,7 @@ pub fn parse_and_resolve_peer_addr(peer: &str) -> Option<(NodeID, Vec<SocketAddr
let delim = peer.find('@')?;
let (key, host) = peer.split_at(delim);
let pubkey = NodeID::from_slice(&hex::decode(&key).ok()?)?;
let hosts = host[1..]
.to_socket_addrs()
.ok()?
.collect::<Vec<_>>();
let hosts = host[1..].to_socket_addrs().ok()?.collect::<Vec<_>>();
if hosts.is_empty() {
return None;
}