diff options
Diffstat (limited to 'src/data/coarena.rs')
| -rw-r--r-- | src/data/coarena.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/data/coarena.rs b/src/data/coarena.rs index 1f01c05..c6fd122 100644 --- a/src/data/coarena.rs +++ b/src/data/coarena.rs @@ -29,6 +29,10 @@ impl<T> Coarena<T> { self.data.get(index as usize).map(|(_, t)| t) } + pub(crate) fn get_gen(&self, index: u32) -> Option<u32> { + self.data.get(index as usize).map(|(gen, _)| *gen) + } + /// Deletes an element for the coarena and returns its value. /// /// This method will reset the value to the given `removed_value`. |
