Fix some new clippy lints

This commit is contained in:
Alex Auvolat
2022-03-14 12:00:23 +01:00
parent 0af314b295
commit ba6b56ae68
14 changed files with 22 additions and 37 deletions
+2 -4
View File
@@ -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)))