Pop the last key-value pair.
(&mut self)
| 281 | |
| 282 | /// Pop the last key-value pair. |
| 283 | pub fn pop(&mut self) -> Option<(K, V)> { |
| 284 | if let (Some(key), Some(value)) = (self.keys.pop(), self.values.pop()) { |
| 285 | Some((key, value)) |
| 286 | } else { |
| 287 | None |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | /// Remove and return the first key-value pair. |
| 292 | pub fn remove_first(&mut self) -> Option<(K, V)> { |
no outgoing calls
no test coverage detected