(a: &PyObject, b: &PyObject, op: F, vm: &VirtualMachine)
| 721 | }; |
| 722 | |
| 723 | fn number_op<F, R>(a: &PyObject, b: &PyObject, op: F, vm: &VirtualMachine) -> PyResult |
| 724 | where |
| 725 | F: FnOnce(&BigInt, &BigInt, &VirtualMachine) -> R, |
| 726 | R: ToPyResult, |
| 727 | { |
| 728 | if let (Some(a), Some(b)) = (a.downcast_ref::<Self>(), b.downcast_ref::<Self>()) { |
| 729 | op(&a.value, &b.value, vm).to_pyresult(vm) |
| 730 | } else { |
| 731 | Ok(vm.ctx.not_implemented()) |
| 732 | } |
| 733 | } |
| 734 | } |
| 735 | |
| 736 | #[derive(FromArgs)] |
nothing calls this directly
no test coverage detected