(self, call: F)
| 406 | where |
| 407 | F: FnOnce(&K) -> V, |
| 408 | { |
| 409 | match self { |
| 410 | Entry::Occupied(entry) => entry.into_mut(), |
| 411 | Entry::Vacant(entry) => { |
| 412 | let value = call(&entry.key); |
| 413 | entry.insert(value) |
| 414 | } |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | /// Gets the entry's key. |
| 419 | #[inline] |
| 420 | pub fn key(&self) -> K { |
| 421 | match *self { |
| 422 | Entry::Occupied(ref entry) => entry.key(), |