Skip to content

Commit 16321f3

Browse files
Implement size_hint()
Better than the default implementation. See: #749 (comment)
1 parent 023fb92 commit 16321f3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/message.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ impl<'pair> Iterator for MessageTrailersIterator<'pair> {
9999
.next()
100100
.map(|index| to_str_tuple(&self.trailers, index))
101101
}
102+
103+
fn size_hint(&self) -> (usize, Option<usize>) {
104+
self.range.size_hint()
105+
}
102106
}
103107

104108
fn to_str_tuple(

0 commit comments

Comments
 (0)