Skip to content

Commit 91493f2

Browse files
committed
Implement size_hint for BlockingIter
Unlike the other two iterators, this will never return None
1 parent 740953a commit 91493f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/notification.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ impl<'a> Iterator for BlockingIter<'a> {
146146
_ => unreachable!(),
147147
}
148148
}
149+
150+
fn size_hint(&self) -> (usize, Option<usize>) {
151+
(usize::max_value(), None)
152+
}
149153
}
150154

151155
/// An iterator over notifications which will block for a period of time if

0 commit comments

Comments
 (0)