Elide lifetime

This commit is contained in:
kjeremy 2019-04-26 11:41:14 -04:00
parent 42c4e0f378
commit 70dc33e00c

View File

@ -76,7 +76,7 @@ impl<ID: ArenaId, T> Arena<ID, T> {
self.data.push(value);
ID::from_raw(id)
}
pub fn iter<'a>(&'a self) -> impl Iterator<Item = (ID, &'a T)> {
pub fn iter(&self) -> impl Iterator<Item = (ID, &T)> {
self.data.iter().enumerate().map(|(idx, value)| (ID::from_raw(RawId(idx as u32)), value))
}
}