expect reason

This commit is contained in:
hinto.janai 2024-09-20 16:18:09 -04:00
parent 5ee10a3775
commit 9738ed5660
No known key found for this signature in database
GPG key ID: D47CE05FA175A499

View file

@ -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();
}