Skip to content

Commit

Permalink
collapse conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
bw-solana committed Jan 18, 2024
1 parent a5766d0 commit 48dcfd2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core/src/repair/repair_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,11 +726,9 @@ impl RepairService {
if let Some(pubkey) = pubkey {
let peer_repair_addr =
cluster_info.lookup_contact_info(&pubkey, |node| node.serve_repair(Protocol::UDP));
if let Some(peer_repair_addr) = peer_repair_addr {
if let Ok(peer_repair_addr) = peer_repair_addr {
trace!("Repair peer {pubkey} has valid repair socket: {peer_repair_addr:?}");
repair_peers.push((pubkey, peer_repair_addr));
}
if let Some(Ok(peer_repair_addr)) = peer_repair_addr {
trace!("Repair peer {pubkey} has valid repair socket: {peer_repair_addr:?}");
repair_peers.push((pubkey, peer_repair_addr));
}
};
if repair_peers.is_empty() {
Expand Down

0 comments on commit 48dcfd2

Please sign in to comment.