Skip to content

Commit

Permalink
regex: implement size_hint for set match iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
srijs authored and BurntSushi committed Jun 19, 2018
1 parent ba52be1 commit a90fbd2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/re_set.rs
Expand Up @@ -295,6 +295,10 @@ impl Iterator for SetMatchesIntoIter {
}
}
}

fn size_hint(&self) -> (usize, Option<usize>) {
self.0.size_hint()
}
}

impl DoubleEndedIterator for SetMatchesIntoIter {
Expand Down Expand Up @@ -331,6 +335,10 @@ impl<'a> Iterator for SetMatchesIter<'a> {
}
}
}

fn size_hint(&self) -> (usize, Option<usize>) {
self.0.size_hint()
}
}

impl<'a> DoubleEndedIterator for SetMatchesIter<'a> {
Expand Down

0 comments on commit a90fbd2

Please sign in to comment.