MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / entry

Method entry

src/entity/sparse.rs:154–162  ·  view source on GitHub ↗
(&mut self, key: K)

Source from the content-addressed store, hash-verified

152 #[inline]
153 #[track_caller]
154 pub fn entry(&mut self, key: K) -> Entry<'_, K, V> {
155 let index = self.sparse[key] as usize;
156 let entry = self.dense.get(index);
157 if entry.is_some_and(|entry| entry.0 == key) {
158 Entry::Occupied(OccupiedEntry { map: self, index })
159 } else {
160 Entry::Vacant(VacantEntry { map: self, key })
161 }
162 }
163
164 /// Insert a value into the map.
165 ///

Callers 12

assignMethod · 0.80
advance_leftMethod · 0.80
newMethod · 0.80
clobber_unitMethod · 0.80
initial_valueMethod · 0.80
process_editMethod · 0.80
computeMethod · 0.80
add_valueMethod · 0.80
set_valueMethod · 0.80
restore_valuesMethod · 0.80
removeMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected