diff options
author | Alex Auvolat <alex@adnab.me> | 2021-10-18 12:59:55 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-10-18 12:59:55 +0200 |
commit | de981aace0e47a1fa65b38212ac21d91e52f7c15 (patch) | |
tree | 41cc8a89728738f4225d576d6bde1585ea1d5978 /src | |
parent | cbdd6ab2152a5ceba04af5560aca7f8917afb237 (diff) | |
download | netapp-de981aace0e47a1fa65b38212ac21d91e52f7c15.tar.gz netapp-de981aace0e47a1fa65b38212ac21d91e52f7c15.zip |
apply fmt
Diffstat (limited to 'src')
-rw-r--r-- | src/util.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/util.rs b/src/util.rs index 047095f..f4dfac7 100644 --- a/src/util.rs +++ b/src/util.rs @@ -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; } |