mirror of
https://github.com/nelsbrock/iter_accumulate.git
synced 2026-08-14 22:16:48 +02:00
explicitly implement count method for Accumulate
This commit is contained in:
@@ -43,6 +43,11 @@ where
|
|||||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||||
self.iter.size_hint()
|
self.iter.size_hint()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn count(self) -> usize {
|
||||||
|
self.iter.count()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An [`Iterator`] blanket implementation that provides the [`accumulate()`](Self::accumulate)
|
/// An [`Iterator`] blanket implementation that provides the [`accumulate()`](Self::accumulate)
|
||||||
|
|||||||
Reference in New Issue
Block a user