aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/kubernetes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/kubernetes.rs')
-rw-r--r--src/rpc/kubernetes.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rpc/kubernetes.rs b/src/rpc/kubernetes.rs
index 8c0d6cdf..272d9162 100644
--- a/src/rpc/kubernetes.rs
+++ b/src/rpc/kubernetes.rs
@@ -63,10 +63,8 @@ pub async fn get_kubernetes_nodes(
let pubkey = &node
.metadata
.name
- .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(pubkey) = pubkey {
ret.push((*pubkey, SocketAddr::new(node.spec.address, node.spec.port)))