diff --git a/src/notification.rs b/src/notification.rs index f825acb8..5ea405dd 100644 --- a/src/notification.rs +++ b/src/notification.rs @@ -117,6 +117,10 @@ impl<'a> Iterator for Iter<'a> { _ => unreachable!(), } } + + fn size_hint(&self) -> (usize, Option) { + (self.conn.conn.borrow().notifications.len(), None) + } } /// An iterator over notifications which will block if none are pending. @@ -190,4 +194,8 @@ impl<'a> Iterator for TimeoutIter<'a> { _ => unreachable!(), } } + + fn size_hint(&self) -> (usize, Option) { + (self.conn.conn.borrow().notifications.len(), None) + } }