(&mut self, key: K)
| 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 | /// |
no test coverage detected