We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Iterator::{count,last,nth}
IdxRange
1 parent 86eaf53 commit 665c0cbCopy full SHA for 665c0cb
lib/la-arena/src/lib.rs
@@ -184,6 +184,24 @@ impl<T> Iterator for IdxRange<T> {
184
fn size_hint(&self) -> (usize, Option<usize>) {
185
self.range.size_hint()
186
}
187
+
188
+ fn count(self) -> usize
189
+ where
190
+ Self: Sized,
191
+ {
192
+ self.range.count()
193
+ }
194
195
+ fn last(self) -> Option<Self::Item>
196
197
198
199
+ self.range.last().map(|raw| Idx::from_raw(raw.into()))
200
201
202
+ fn nth(&mut self, n: usize) -> Option<Self::Item> {
203
+ self.range.nth(n).map(|raw| Idx::from_raw(raw.into()))
204
205
206
207
impl<T> DoubleEndedIterator for IdxRange<T> {
0 commit comments