mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
add size_hint for dict iterator
This commit is contained in:
parent
ca8490dc71
commit
39f73b4c7b
1 changed files with 6 additions and 0 deletions
|
@ -89,6 +89,12 @@ impl<'a, K, V> Iterator for IntoIter<'a, K, V> {
|
|||
|
||||
item
|
||||
}
|
||||
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
let remaining = self.items.0.len() - self.index;
|
||||
|
||||
(remaining, Some(remaining))
|
||||
}
|
||||
}
|
||||
|
||||
impl<K: Debug, V: Debug> Debug for RocDict<K, V> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue