Add iter() and values() functions to PrimaryMap and EntityMap.
`iter()` iterates over both keys and values, while `values()` iterates over just values. Also add `_mut()` versions. These replace the otherwise common idiom of iterating with `keys()` and using indexing to get the values, allowing for simpler code.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
//! `Vec`.
|
||||
|
||||
mod keys;
|
||||
mod iter;
|
||||
mod list;
|
||||
mod map;
|
||||
mod primary;
|
||||
@@ -37,6 +38,7 @@ mod sparse;
|
||||
mod set;
|
||||
|
||||
pub use self::keys::Keys;
|
||||
pub use self::iter::{Iter, IterMut};
|
||||
pub use self::list::{EntityList, ListPool};
|
||||
pub use self::map::EntityMap;
|
||||
pub use self::primary::PrimaryMap;
|
||||
|
||||
Reference in New Issue
Block a user