(&self, dict_other: PyDictRef, vm: &VirtualMachine)
| 188 | } |
| 189 | |
| 190 | fn merge_dict(&self, dict_other: PyDictRef, vm: &VirtualMachine) -> PyResult<()> { |
| 191 | let dict = &self.entries; |
| 192 | let dict_size = &dict_other.size(); |
| 193 | for (key, value) in &dict_other { |
| 194 | dict.insert(vm, &*key, value)?; |
| 195 | } |
| 196 | if dict_other.entries.has_changed_size(dict_size) { |
| 197 | return Err(vm.new_runtime_error("dict mutated during update")); |
| 198 | } |
| 199 | Ok(()) |
| 200 | } |
| 201 | |
| 202 | pub fn is_empty(&self) -> bool { |
| 203 | self.entries.len() == 0 |
no test coverage detected