From 177c2adaa2f0a46e82e85bbd271b1ccf0ad3de8e Mon Sep 17 00:00:00 2001 From: npub1tquskdu6yc4h8l7xxtceculxw600grekeq0xg2ukqfrwl7vrzg3quz3gmp <58390b379a262b73ffc632f19c73e6769ef40f36c81e642b960246eff9831222@buzz.block.builderlab.xyz> Date: Fri, 31 Jul 2026 21:28:18 -0700 Subject: [PATCH] fix(acp): satisfy inbound denial lint gates Co-authored-by: Tom Brow Signed-off-by: Tom Brow --- crates/buzz-acp/src/inbound_denial.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/buzz-acp/src/inbound_denial.rs b/crates/buzz-acp/src/inbound_denial.rs index 49f6999e7..3322aa675 100644 --- a/crates/buzz-acp/src/inbound_denial.rs +++ b/crates/buzz-acp/src/inbound_denial.rs @@ -30,7 +30,6 @@ pub(crate) enum GateOutcome { /// /// Keeping all four inputs as values makes every branch directly testable. The /// caller must publish only for [`GateOutcome::DropAndDeny`]. -#[must_use] pub(crate) fn classify_inbound( allowed: bool, mentioned: bool, @@ -155,10 +154,10 @@ impl DenialLimiter { self.prune(now); let author_key = (channel_id, author.to_string()); !self.by_author.contains_key(&author_key) - && !self + && self .by_channel .get(&channel_id) - .is_some_and(|sent_at| sent_at.len() >= DENIALS_PER_CHANNEL_PER_WINDOW) + .is_none_or(|sent_at| sent_at.len() < DENIALS_PER_CHANNEL_PER_WINDOW) } fn record_at(&mut self, channel_id: Uuid, author: &str, now: Instant) {