Eliah-Lakhin / lady-deirdre

Compiler front-end foundation technology.
http://lady-deirdre.lakhin.com/
446 stars 13 forks source link

Enumeration iterators for the Repo collection #30

Closed Eliah-Lakhin closed 4 weeks ago

Eliah-Lakhin commented 4 weeks ago

Resolves #29

Introduces three utility function to the arena::Repo collection:

  1. Repo::enumerate - yields pairs of (Entry, &T) for non-exclusive iteration.
  2. Repo::enumerate_mut - yields pairs of (Entry, &mut T) for exclusive iteration.
  3. Repo::into_enumeration - yields owning pairs of (Entry, T).