From d74f5aac25051cfef3243087a2d14e13ccd5b87b Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 29 Mar 2024 21:38:19 +0100 Subject: [PATCH] Fix comparison --- neqo-common/src/timer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neqo-common/src/timer.rs b/neqo-common/src/timer.rs index 41afd2cdab..8e1e843f02 100644 --- a/neqo-common/src/timer.rs +++ b/neqo-common/src/timer.rs @@ -200,7 +200,7 @@ impl Timer { pub fn take_next(&mut self, until: Instant) -> Option { let last_bucket = self.cursor + self.delta(until); - let range = if last_bucket <= self.items.len() { + let range = if last_bucket < self.items.len() { // Simple case, no wrap around. #[allow(clippy::range_plus_one)] // non-inclusive range to match with type below (self.cursor..(last_bucket + 1)).chain(0..0) // additional empty range to match with