From f1aac103aa916ba0bd7bcf0b2df52e1809c34943 Mon Sep 17 00:00:00 2001 From: Axel Forsman Date: Sun, 11 Sep 2022 12:56:58 +0200 Subject: [PATCH] Fix BlockIter::size_hint upper bound The current block (`self.head`) can contribute up to `B::bits()` elements, not just one. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 80ee624..50a6674 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -917,7 +917,7 @@ where #[inline] fn size_hint(&self) -> (usize, Option) { match self.tail.size_hint() { - (_, Some(h)) => (0, Some(1 + h * B::bits())), + (_, Some(h)) => (0, Some((1 + h) * B::bits())), _ => (0, None), } }