From e3c7023350ecfb1a932fe8c87423886068b9bf06 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 13 Jan 2023 23:28:04 +1100 Subject: [PATCH] fix(gossipsub): allow clippy beta lint (#3321) It doesn't appear that https://github.com/rust-lang/rust-clippy/issues/10061 is going to be fixed any time soon. In the meantime, our CI is "red" which is misleading because we purposely don't require this CI check. It will however hit stable in ~ 2 weeks at which point our required clippy CI check will fail. Suppress clippy lint with an `allow` to make it pass. --- protocols/gossipsub/src/behaviour.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/protocols/gossipsub/src/behaviour.rs b/protocols/gossipsub/src/behaviour.rs index 69195b74cbd..fce25c12aff 100644 --- a/protocols/gossipsub/src/behaviour.rs +++ b/protocols/gossipsub/src/behaviour.rs @@ -1416,6 +1416,8 @@ where peer_score.add_penalty(peer_id, 1); // check the flood cutoff + // See: https://github.com/rust-lang/rust-clippy/issues/10061 + #[allow(unknown_lints, clippy::unchecked_duration_subtraction)] let flood_cutoff = (backoff_time + self.config.graft_flood_threshold()) - self.config.prune_backoff();