From 7a4ef1ea3628cd6a1aff374fa9c34273a88a2ec6 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Sat, 28 Sep 2024 15:53:15 +0200 Subject: [PATCH] ids: Rename some IndexedIdVec/IdVec methods * IndexedIdVec::get_id -> get_key * IdVec::extend -> IdVec::extend_values --- eqy-engine/src/unroll.rs | 2 +- ids/src/id_vec.rs | 2 +- ids/src/indexed_id_vec.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eqy-engine/src/unroll.rs b/eqy-engine/src/unroll.rs index cb5f57b..5caa2f2 100644 --- a/eqy-engine/src/unroll.rs +++ b/eqy-engine/src/unroll.rs @@ -195,7 +195,7 @@ impl Unroll { } fn find_unrolled_repr_var(&self, step: TimeStep, seq_var: Var) -> Option { - let seen = self.seen_from_seq.get_id(&seq_var)?; + let seen = self.seen_from_seq.get_key(&seq_var)?; let comb_from_seen = self.comb_from_seen.get(step)?; let slot = comb_from_seen.get(seen)?; *slot diff --git a/ids/src/id_vec.rs b/ids/src/id_vec.rs index b09a585..8c053ba 100644 --- a/ids/src/id_vec.rs +++ b/ids/src/id_vec.rs @@ -522,7 +522,7 @@ impl IdVec { /// Inserts values from an iterator using the smallset available ids as keys. #[inline] - pub fn extend(&mut self, iter: impl IntoIterator) { + pub fn extend_values(&mut self, iter: impl IntoIterator) { // TODO document why we're not implementing the Extend trait self.modify_values(|values| values.extend(iter)) } diff --git a/ids/src/indexed_id_vec.rs b/ids/src/indexed_id_vec.rs index 6412d1b..1313d86 100644 --- a/ids/src/indexed_id_vec.rs +++ b/ids/src/indexed_id_vec.rs @@ -123,7 +123,7 @@ impl IndexedIdVec { /// Retrieves the key for a value in the set. /// /// Returns `None` if the set doesn't contain the given value. - pub fn get_id(&self, value: &Q) -> Option + pub fn get_key(&self, value: &Q) -> Option where V: Borrow, Q: Hash + Eq + ?Sized,