Skip to content

Commit 5173182

Browse files
committed
Add Empty::size_hint
1 parent 082f096 commit 5173182

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/sources.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ impl<T> StreamingIterator for Empty<T> {
189189
fn get(&self) -> Option<&Self::Item> {
190190
None
191191
}
192+
193+
#[inline]
194+
fn size_hint(&self) -> (usize, Option<usize>) {
195+
(0, Some(0))
196+
}
192197
}
193198

194199
impl<T> DoubleEndedStreamingIterator for Empty<T> {

0 commit comments

Comments
 (0)