diff --git a/agb/src/hash_map.rs b/agb/src/hash_map.rs index 45939093..11cf4519 100644 --- a/agb/src/hash_map.rs +++ b/agb/src/hash_map.rs @@ -351,6 +351,10 @@ impl<'a, K, V, ALLOCATOR: ClonableAllocator> Iterator for Iter<'a, K, V, ALLOCAT } } } + + fn size_hint(&self) -> (usize, Option) { + (self.map.len(), Some(self.map.len())) + } } impl<'a, K, V, ALLOCATOR: ClonableAllocator> IntoIterator for &'a HashMap { @@ -388,6 +392,10 @@ impl Iterator for IterOwned } } } + + fn size_hint(&self) -> (usize, Option) { + (self.map.len(), Some(self.map.len())) + } } /// An iterator over entries of a [`HashMap`]