Skip to content

Commit ea2e5bb

Browse files
committed
fix: Return ExactSizeIterator where applicable.
That way, the caller can obtain the amount of patterns more easily.
1 parent f520a51 commit ea2e5bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gix-pathspec/src/search/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl Match<'_> {
3939
/// Access
4040
impl Search {
4141
/// Return an iterator over the patterns that participate in the search.
42-
pub fn patterns(&self) -> impl Iterator<Item = &Pattern> + '_ {
42+
pub fn patterns(&self) -> impl ExactSizeIterator<Item = &Pattern> + '_ {
4343
self.patterns.iter().map(|m| &m.value.pattern)
4444
}
4545

0 commit comments

Comments
 (0)