Get the element at `k` mutably, if it exists.
(&mut self, k: K)
| 108 | |
| 109 | /// Get the element at `k` mutably, if it exists. |
| 110 | pub fn get_mut(&mut self, k: K) -> Option<&mut V> { |
| 111 | self.elems.get_mut(k.index()) |
| 112 | } |
| 113 | |
| 114 | /// Insert the given key-value pair, returning the old value if it exists. |
| 115 | pub fn insert(&mut self, k: K, v: V) -> Option<V> { |