mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
Elide lifetime
This commit is contained in:
parent
42c4e0f378
commit
70dc33e00c
@ -76,7 +76,7 @@ impl<ID: ArenaId, T> Arena<ID, T> {
|
|||||||
self.data.push(value);
|
self.data.push(value);
|
||||||
ID::from_raw(id)
|
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))
|
self.data.iter().enumerate().map(|(idx, value)| (ID::from_raw(RawId(idx as u32)), value))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user