mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-07-04 00:17:29 +00:00
Get a basic first test working, and lots of changes to supporting code to facilitate this
This commit is contained in:
@@ -88,6 +88,13 @@ where
|
||||
.filter_map(|(id, item)| Some((id.into(), item.as_mut()?)))
|
||||
}
|
||||
|
||||
pub fn into_iter(self) -> impl Iterator<Item = (Id, T)> {
|
||||
self.items
|
||||
.into_iter()
|
||||
.enumerate()
|
||||
.filter_map(|(id, item)| Some((id.into(), item?)))
|
||||
}
|
||||
|
||||
pub fn len(&self) -> usize {
|
||||
self.items.len() - self.retired.len()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user