From 3258f9f69bac78c6d7970e3abfda7890759392dd Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Thu, 1 Feb 2024 14:38:34 -0600 Subject: [PATCH] chore: fix a few clippy lints --- crates/anemo/src/network/connection_manager.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/anemo/src/network/connection_manager.rs b/crates/anemo/src/network/connection_manager.rs index 89507fb..a0cd540 100644 --- a/crates/anemo/src/network/connection_manager.rs +++ b/crates/anemo/src/network/connection_manager.rs @@ -250,12 +250,11 @@ impl ConnectionManager { // TODO close the connection explicitly with a reason once we have machine // readable errors. See https://github.com/MystenLabs/anemo/issues/13 for more info. match known_peers.get(&connection.peer_id()) { - Some(PeerInfo { affinity, .. }) - if matches!(affinity, PeerAffinity::High | PeerAffinity::Allowed) => + Some(PeerInfo { affinity: PeerAffinity::High | PeerAffinity::Allowed, .. }) => { // Do nothing, let the connection through } - Some(PeerInfo { affinity, .. }) if matches!(affinity, PeerAffinity::Never) => { + Some(PeerInfo { affinity: PeerAffinity::Never, .. }) => { return Err(anyhow::anyhow!( "rejecting connection from peer {} due to having PeerAffinity::Never", connection.peer_id()