From 9738ed5660916871971f0aceb8db1996b98006d3 Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Fri, 20 Sep 2024 16:18:09 -0400 Subject: [PATCH] expect reason --- p2p/p2p-core/src/handles.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/p2p/p2p-core/src/handles.rs b/p2p/p2p-core/src/handles.rs index 30123f7..06dc212 100644 --- a/p2p/p2p-core/src/handles.rs +++ b/p2p/p2p-core/src/handles.rs @@ -91,7 +91,10 @@ impl ConnectionHandle { } /// Bans the peer for the given `duration`. pub fn ban_peer(&self, duration: Duration) { - #[expect(clippy::let_underscore_must_use, reason = "TODO: handle error")] + #[expect( + clippy::let_underscore_must_use, + reason = "error means peer is already banned; fine to ignore" + )] let _ = self.ban.set(BanPeer(duration)); self.token.cancel(); }