Get a basic first test working, and lots of changes to supporting code to facilitate this

This commit is contained in:
James Wilson
2021-07-09 17:27:49 +01:00
parent c043393e28
commit 28be68e65f
17 changed files with 980 additions and 350 deletions
+7
View File
@@ -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()
}