(tool: usize, vm: &VirtualMachine)
| 172 | } |
| 173 | |
| 174 | fn check_tool_in_use(tool: usize, vm: &VirtualMachine) -> PyResult<()> { |
| 175 | let state = vm.state.monitoring.lock(); |
| 176 | if state.tool_names[tool].is_some() { |
| 177 | Ok(()) |
| 178 | } else { |
| 179 | Err(vm.new_value_error(format!("tool {tool} is not in use"))) |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | fn parse_single_event(event: i32, vm: &VirtualMachine) -> PyResult<usize> { |
| 184 | let event = u32::try_from(event) |
no test coverage detected