From d6d9ad2a573da5b1d38f466e1bb12b4483d9b732 Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Tue, 30 Jul 2024 22:01:48 +0100 Subject: [PATCH] fix fix test --- libs/utils/src/leaky_bucket.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/utils/src/leaky_bucket.rs b/libs/utils/src/leaky_bucket.rs index 418024c9dc..509190a449 100644 --- a/libs/utils/src/leaky_bucket.rs +++ b/libs/utils/src/leaky_bucket.rs @@ -63,7 +63,7 @@ impl LeakyBucketState { pub fn bucket_is_empty(&self, config: &LeakyBucketConfig, now: Instant) -> bool { // if self.end is after now, the bucket is not empty - config.prev_multiple_of_drain(now - config.epoch) <= self.end + self.end <= config.prev_multiple_of_drain(now - config.epoch) } /// Immediately adds tokens to the bucket, if there is space.