Use ‘index’ terminology for arena consistently

This commit is contained in:
Aramis Razzaghipour 2021-01-15 11:02:08 +11:00
parent 3224ecea87
commit 1d103cf087
No known key found for this signature in database
GPG key ID: F788F7E990136003
6 changed files with 56 additions and 53 deletions

View file

@ -9,7 +9,7 @@
//! absolute offsets. The `Trace` structure (inspired, at least in name, by
//! Kotlin's `BindingTrace`) allows use the same code to compute both
//! projections.
use la_arena::{Arena, ArenaMap, Idx, RawId};
use la_arena::{Arena, ArenaMap, Idx, RawIdx};
pub(crate) struct Trace<T, V> {
arena: Option<Arena<T>>,
@ -30,7 +30,7 @@ impl<T, V> Trace<T, V> {
let id = if let Some(arena) = &mut self.arena {
arena.alloc(data())
} else {
let id = Idx::<T>::from_raw(RawId::from(self.len));
let id = Idx::<T>::from_raw(RawIdx::from(self.len));
self.len += 1;
id
};