Implement some trivial size_hints for various iterators
This also implements ExactSizeIterator where applicable. Addresses most of the Iterator traits mentioned in #23708.
This commit is contained in:
parent
6bfa7d02d6
commit
619003d1d4
13 changed files with 102 additions and 0 deletions
|
|
@ -602,6 +602,11 @@ impl<'a> Iterator for ListAttributesIter<'a> {
|
|||
|
||||
None
|
||||
}
|
||||
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
let lower = self.current_list.len();
|
||||
(lower, None)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait AttributesExt {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue