Skip to content

Commit a90fbd2

Browse files
srijsBurntSushi
authored andcommitted
regex: implement size_hint for set match iterators
1 parent ba52be1 commit a90fbd2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/re_set.rs

+8
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,10 @@ impl Iterator for SetMatchesIntoIter {
295295
}
296296
}
297297
}
298+
299+
fn size_hint(&self) -> (usize, Option<usize>) {
300+
self.0.size_hint()
301+
}
298302
}
299303

300304
impl DoubleEndedIterator for SetMatchesIntoIter {
@@ -331,6 +335,10 @@ impl<'a> Iterator for SetMatchesIter<'a> {
331335
}
332336
}
333337
}
338+
339+
fn size_hint(&self) -> (usize, Option<usize>) {
340+
self.0.size_hint()
341+
}
334342
}
335343

336344
impl<'a> DoubleEndedIterator for SetMatchesIter<'a> {

0 commit comments

Comments
 (0)