(&self, other: PyObjectRef, op: F, vm: &VirtualMachine)
| 365 | |
| 366 | #[inline] |
| 367 | fn general_op<F>(&self, other: PyObjectRef, op: F, vm: &VirtualMachine) -> PyResult |
| 368 | where |
| 369 | F: Fn(&BigInt, &BigInt) -> PyResult, |
| 370 | { |
| 371 | if let Some(other) = other.downcast_ref::<Self>() { |
| 372 | op(&self.value, &other.value) |
| 373 | } else { |
| 374 | Ok(vm.ctx.not_implemented()) |
| 375 | } |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | #[pyclass( |
no test coverage detected