From b81e5ef47b53cdadb377910e5e99c9c0f7a9f740 Mon Sep 17 00:00:00 2001 From: Kirill Lykov Date: Fri, 8 Nov 2024 17:13:46 +0100 Subject: [PATCH] fix clippy error --- rpc/src/cluster_tpu_info.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpc/src/cluster_tpu_info.rs b/rpc/src/cluster_tpu_info.rs index 6f36db15fe1eb0..c57e76ff566649 100644 --- a/rpc/src/cluster_tpu_info.rs +++ b/rpc/src/cluster_tpu_info.rs @@ -78,9 +78,9 @@ impl TpuInfo for ClusterTpuInfo { .filter_map(|leader_pubkey| { self.recent_peers .get(leader_pubkey) - .and_then(|addr| match protocol { - Protocol::UDP => Some(&addr.0), - Protocol::QUIC => Some(&addr.1), + .map(|addr| match protocol { + Protocol::UDP => &addr.0, + Protocol::QUIC => &addr.1, }) }) .collect()