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

Method get_mut

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

Source from the content-addressed store, hash-verified

121 #[inline]
122 #[track_caller]
123 pub fn get_mut(&mut self, key: K) -> Option<&mut V> {
124 let entry = self.dense.get_mut(self.sparse[key] as usize)?;
125 if entry.0 == key {
126 return Some(&mut entry.1);
127 }
128 None
129 }
130
131 /// Return the index into `dense` of the value corresponding to `key`.
132 #[inline]

Callers 3

clobber_unitMethod · 0.45
insertMethod · 0.45
and_modifyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected