(self, call: F)
| 392 | where |
| 393 | F: FnOnce() -> V, |
| 394 | { |
| 395 | match self { |
| 396 | Entry::Occupied(entry) => entry.into_mut(), |
| 397 | Entry::Vacant(entry) => entry.insert(call()), |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | /// Inserts the result of the `call` function with a reference to the entry's key if it is |
| 402 | /// vacant, and returns a mutable reference to the new value. Otherwise a mutable reference to |
| 403 | /// an already existent value is returned. |
| 404 | #[inline] |
| 405 | pub fn or_insert_with_key<F>(self, call: F) -> &'a mut V |