diff options
author | Alex Auvolat <alex@adnab.me> | 2022-03-14 12:00:23 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-03-14 12:27:49 +0100 |
commit | ba6b56ae68d5842d814769418d484093865261aa (patch) | |
tree | 2620aadaa46718680ba6e66946ca487839335f56 /src/rpc/consul.rs | |
parent | 0af314b295f70fdf107524b08063f4d36fb4eeb6 (diff) | |
download | garage-ba6b56ae68d5842d814769418d484093865261aa.tar.gz garage-ba6b56ae68d5842d814769418d484093865261aa.zip |
Fix some new clippy lintsfix-resync
Diffstat (limited to 'src/rpc/consul.rs')
-rw-r--r-- | src/rpc/consul.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rpc/consul.rs b/src/rpc/consul.rs index e70288dd..15acbcef 100644 --- a/src/rpc/consul.rs +++ b/src/rpc/consul.rs @@ -51,10 +51,8 @@ pub async fn get_consul_nodes( let pubkey = ent .node_meta .get("pubkey") - .map(|k| hex::decode(&k).ok()) - .flatten() - .map(|k| NodeID::from_slice(&k[..])) - .flatten(); + .and_then(|k| hex::decode(&k).ok()) + .and_then(|k| NodeID::from_slice(&k[..])); if let (Some(ip), Some(pubkey)) = (ip, pubkey) { ret.push((pubkey, SocketAddr::new(ip, ent.service_port))); } else { |