(&self, vm: &VirtualMachine, key: &K, pred: F)
| 451 | } |
| 452 | |
| 453 | pub fn delete_if<K, F>(&self, vm: &VirtualMachine, key: &K, pred: F) -> PyResult<bool> |
| 454 | where |
| 455 | K: DictKey + ?Sized, |
| 456 | F: Fn(&T) -> PyResult<bool>, |
| 457 | { |
| 458 | self.remove_if(vm, key, pred).map(|opt| opt.is_some()) |
| 459 | } |
| 460 | |
| 461 | pub fn remove_if_exists<K>(&self, vm: &VirtualMachine, key: &K) -> PyResult<Option<T>> |
| 462 | where |
no test coverage detected